Add tests for filename_language
The next patch touches the filename_language area, but I noticed there
is no test exercising that. This patch adds some selftests for
add_filename_language, deduce_language_from_filename and
set_ext_lang_command. Because these tests add entries to the global
filename_language_table vector, it is not possible to run them
successfully multiple times in a same GDB instance. They can
potentially interfere with each other for the same reason. I therefore
added the scoped_restore_filename_language_table class that is used to
make sure tests leave that global vector in the same state they found it
(it is replaced in the following patch by a simple scoped_restore).
gdb/ChangeLog:
* symfile.c: Include selftest.h.
(class scoped_restore_filename_language_table): New.
(test_filename_language): New test.
(test_set_ext_lang_command): New test.
(_initialize_symfile): Register tests.