libiberty: sync with gcc

Import the following commits from GCC as of r16-614-g9d039eff453f77:
	31dd621796f libiberty: add ldirname function
	f3d07779fdb libiberty: Append <libgen.h> to AC_CHECK_DECLS [PR119218].
	90183362524 libiberty, gcc: Add memrchr to libiberty and use it [PR119283].
	43717ee9064 libiberty: Fix off-by-one when collecting range expression
12 files changed