Fix missing #include in commands/matview.h.

It needs parsenodes.h to be compilable regardless of previous headers.
Adjust nls.mk for split out of wait_error.c
Code beautification for object-access hook machinery.

KaiGai Kohei
Add fe_memutils.c to nls.mk where used
Arrange to cache FdwRoutine structs in foreign tables' relcache entries.

This saves several catalog lookups per reference.  It's not all that
exciting right now, because we'd managed to minimize the number of places
that need to fetch the data; but the upcoming writable-foreign-tables patch
needs this info in a lot more places.
Fix tli history file fetching, broken by the archive after crash recevery patch.

If we were about to enter archive recovery after crash recovery, we scanned
the archive for the latest tli history file, and set the recovery target
timeline to that. However, when we actually tried to read the history file,
we would not fetch the file from the archive, because we were not in archive
recovery yet.

To fix, make readTimeLineHistory and existsTimeLineHistory to always fetch
the file from archive if archive recovery is requested, even if we're not in
archive recovery yet.

Backpatch to 9.2. Mitsumasa KONDO