Fix infinite-loop risk in fixempties() stage of regex compilation.

The previous coding of this function could get into situations where it
would never terminate, because successive passes would re-add EMPTY arcs
that had been removed by the previous pass.  Rewrite the function
completely using a new algorithm that is guaranteed to terminate, and
also seems to be usually faster than the old one.  Per Tcl bugs 3604074
and 3606683.

Tom Lane and Don Porter
Fix typo in docs for ALTER MATERIALIZED VIEW.

Fujii Masao
Remove unnecessary #ifdef FRONTEND check to choose between strdup and pstrdup.

The libpgcommon patch made that unnecessary, palloc and friends are now
available in frontend programs too, mapped to plain old malloc.

As pointed out by Alvaro Herrera.
SP-GiST support of the range adjacent operator -|-

Alexander Korotkov, reviewed by Jeff Davis.
Forgot catversion bump in the SP-GiST adjacent support patch.
Merge branch 'master' of /home/kgrittn/pg/postgresql into matview