Initial import of indexes-only building patch.

Patch from Beena Emerson.
Fixes and cleanup of the new repack_index_swap():

 * Make sure we don't crash if this function is fed a bogus OID
 * rename idx1, idx2 variables for clarity
 * tweak query against pg_class to specify reltype = 0
 * CommandCounterIncrement() is probably unnecessary, removed
Fix existing 'tablespace' regression test so it passes again.

Changes to repack_indexdef() had broken this test.
A few cosmetic fixes to pg_repack.c:
 * fix old reference to --indexes-only
 * trailing whitespace and indentation cleanup to match rest of code
 * XXX note about improving advisory locking
Add advisory locking to repack_one_table()

Avoids danger (or just pointlessness) of having someone run a
table-wide repack and an indexes-only repack of the same table
at the same time.
Change 'have_error' to 'ret' for simplicity.
Factor out advisory locking code into advisory_lock()

Also, some further small fixes of error messages, comments,
marking dubious kludges (e.g. strchr() to determine schema name).
Use our own namespace for advisory locks.

Switch to using the two-input form of pg_advisory_lock(), so as
to avoid impacting other applications which might happen to lock
just the OID of the table. The REPACK_LOCK_PREFIX_STR is a decimal
version of the first three bytes of
  echo -n "pg_repack" | sha1sum
Some error handling cleanup for index building.

Don't bother doing a 'goto cleanup;' after an ereport(ERROR, ...).
Rename --only-index to --only-indexes.

Hopefully makes more clear that all indexes of a table will be repacked.
A few fixes to the indexes-only building.

Improve locking behavior in indexes-only mode so we only need one
ACCESS EXCLUSIVE lock per table instead of one per index. Support
multiple --index options. Fix for schema-name parsing.

Patch from Beena Emerson.
Several more fixes for indexes-only mode:

 * Fix error handling in repack_table_indexes() to keep track of which
   indexes were actually rebuilt successfully by pg_repack, so that only
   those indexes will be dropped. Previously, we would issue an error
   message telling the user to use DROP INDEX but then just drop the
   index anyway.
 * DROP INDEX command needs to quote the schema name in case it is
   not simple.
 * missing CLEARPGRES() in repack_all_indexes()
Documentation updates for indexes-only mode.

Beena Emerson, with some additional cleanup from me.
A few more tweaks/fixes to repack_table_indexes()

 * Avoid using create_idx from a PGresult that's already been PQclear'ed
 * Now that we're properly tracking which indexes have been repacked,
   don't bother with IF EXISTS in DROP INDEX. Better to make any errors
   here stand out.
Improved error handling for repack_table_indexes()

If we do not successfully build any indexes on the target table, bail out
early instead of acquiring an ACCESS EXCLUSIVE lock on the table.
Improved error message distinction for repack_table_indexes().

Previously, any error creating the temp index was blamed on a previous
temporary index existing. However, other errors could occur, e.g. if
--tablespace=pg_global was specified. Perform an explicit check for
whether an existing index_xxxxx already exists first, so that we
can give that error message only in the appropriate case.
Regression tests for the new indexes-repacking features.

Patch from Beena Emerson.