doc: fix hstore_to_json_loose() doc wording
psql: Set up cancel handler later

The cancel handler was uselessly set up even before the first connection
was opened.  By setting it up afterwards, the user can use Ctrl+C to
abort psql if the initial connection attempt hangs.

Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Ryan Kelly <rpkelly22@gmail.com>
doc: Correct psycopg URL
Minor GIN code refactoring.

It makes for cleaner code to have separate Get/Add functions for PostingItems
and ItemPointers.  A few callsites that have to deal with both types need to
be duplicated because of this, but all the callers have to know which one
they're dealing with anyway. Overall, this reduces the amount of casting
required.

Extracted from Alexander Korotkov's larger patch to change the data page
format.
psql: Make \pset without arguments show all settings.

Gilles Darold, reviewed by Pavel Stehule
Add DISCARD SEQUENCES command.

DISCARD ALL will now discard cached sequence information, as well.

Fabrízio de Royes Mello, reviewed by Zoltán Böszörményi, with some
further tweaks by me.
Fix silly thinko in ResetSequenceCaches.

Report from Kevin Hale Boyes.