First pass of SKIP LOCKED DATA patch revival

The patch from [1] brought up to date with master, which involved
resolving a lot of conflicts with all the recent changes for lock
strength.

Next major TODO here is to understand what resources need to be
released (or worse, conditionally released), when returning that
an operation would block, in heapam.c.

[1] http://www.postgresql.org/message-id/CADLWmXUUjmrPU-+9ss7BCATxM-hr6__9mB6Wv7ry3-r+KXGgBw@mail.gmail.com