Create function prototype as part of PG_FUNCTION_INFO_V1 macro

Because of gcc -Wmissing-prototypes, all functions in dynamically
loadable modules must have a separate prototype declaration.  This is
meant to detect global functions that are not declared in header files,
but in cases where the function is called via dfmgr, this is redundant.
Besides filling up space with boilerplate, this is a frequent source of
compiler warnings in extension modules.

We can fix that by creating the function prototype as part of the
PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway.  That
makes the code of modules cleaner, because there is one less place where
the entry points have to be listed, and creates an additional check that
functions have the right prototype.

Remove now redundant prototypes from contrib and other modules.
Fix typo

Amit Langote
libpq:  have PQconnectdbParams() and PQpingParams accept "" as default

Previously, these functions treated "" optin values as defaults in some
ways, but not in others, like when comparing to .pgpass.  Also, add
documentation to clarify that now "" and NULL use defaults, like
PQsetdbLogin() has always done.

BACKWARD INCOMPATIBILITY

Patch by Adrian Vondendriesch, docs by me

Report by Jeff Janes
docs:  tablespaces cannot be accessed independently

Mention impossibility of moving tablespaces, backing them up
independently, or the inadvisability of placing them on temporary
file systems.

Patch by Craig Ringer, adjustments by Ian Lawrence Warwick and me
doc: mention archive_command and recovery_command are exec'ed locally

Report by Craig Ringer
doc: CREATE DATABASE doesn't copy template database-level config params

Report by Alexey Bashtanov
Fix typo.

Etsuro Fujita
Fix another typo.

Etsuro Fujita
pg_stat_statements forgot to let previous occupant of hook get control too.

pgss_post_parse_analyze() neglected to pass the call on to any earlier
occupant of the post_parse_analyze_hook.  There are no other users of that
hook in contrib/, and most likely none in the wild either, so this is
probably just a latent bug.  But it's a bug nonetheless, so back-patch
to 9.2 where this code was introduced.
Avoid transient bogus page contents when creating a sequence.

Don't use simple_heap_insert to insert the tuple to a sequence relation.
simple_heap_insert creates a heap insertion WAL record, and replaying that
will create a regular heap page without the special area containing the
sequence magic constant, which is wrong for a sequence. That was not a bug
because we always created a sequence WAL record after that, and replaying
that overwrote the bogus heap page, and the transient state could never be
seen by another backend because it was only done when creating a new
sequence relation. But it's simpler and cleaner to avoid that in the first
place.
Fix rm_desc routine of b-tree page delete records.

A couple of typos from my refactoring of the page deletion patch.
Retain original physical order of tuples in redo of b-tree splits.

It makes no difference to the system, but minimizing the differences
between a master and standby makes debugging simpler.
Fix bug in new B-tree page deletion code.

When modifying a page, must hold an exclusive lock. A shared lock is
obviously not good enough.
doc: Improve "replication slot" index entries

Now that we have accumulated two different "replication slot" concepts,
make the index entries consistent.
Fix Gin README.

The README incorrectly claimed that GIN posting tree pages contain an array
of uncompressed items in addition to compressed posting lists. Earlier
versions of the GIN posting list compression patch worked that way, but not
the one that was committed.
Fix bug in the new B-tree incomplete-split code.

Forgot to update LSN of left sibling's page, when creating a new root.
I fixed this for regular insertions and page splits earlier, but missed
new root creation.
copy:  update docs for FORCE_NULL and FORCE_NOT_NULL combination

Also update regression tests

Patch by Michael Paquier
regression test:  fix hot standby tests by using repeatable read

Serializable transactions won't work on a Hot Standby.  Also fix
VACUUM/ANALYZE label mixup.

Patch by Martín Marqués
doc:  improve CREATE RULE event list

Patch by Fujii Masao

Report by Emanuel Calvo
release memory used while flushing logical mappings

Patch by Ants Aasma