Add a new function child_path.
child_path returns a pointer to the first component in a child path
that comes after a parent path. This does not depend on trying to
stat() the paths since they may describe remote paths but instead
relies on filename parsing. The function requires that the child path
describe a filename that contains at least one component below the
parent path and returns a pointer to the first component.
gdb/ChangeLog:
* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
unittests/child-path-selftests.c.
* common/pathstuff.c (child_path): New function.
* common/pathstuff.h (child_path): New prototype.
* unittests/child-path-selftests.c: New file.