Replace simple constant pg_am.amcanreturn with an AM support function.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3695a555136a6d179cac8ae48d5f90171d5b30e9
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-12-18T20:50:37Z
Releases: 9.2.0
Replace simple constant pg_am.amcanreturn with an AM support function.

The need for this was debated when we put in the index-only-scan feature,
but at the time we had no near-term expectation of having AMs that could
support such scans for only some indexes; so we kept it simple.  However,
the SP-GiST AM forces the issue, so let's fix it.

This patch only installs the new API; no behavior actually changes.

Files