gdb: refactor the initialization file lookup code
In preparation for the next patch, which adds startup files, this
commit refactors the code for looking up the initialization files so
that the code can be more easily reused in the next commit.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* main.c (relocate_gdbinit_path_maybe_in_datadir): Rename to...
(relocate_file_path_maybe_in_datadir): ...this.
(class gdb_initfile_finder): New class.
(get_init_files): Now uses gdb_initfile_finder.
(print_gdb_help): Print 'None found' when there are no init files.