Fix WAL-logging of B-tree "unlink halfdead page" operation.
Fix WAL-logging of B-tree "unlink halfdead page" operation.

There was some confusion on how to record the case that the operation
unlinks the last non-leaf page in the branch being deleted.
_bt_unlink_halfdead_page set the "topdead" field in the WAL record to
the leaf page, but the redo routine assumed that it would be an invalid
block number in that case. This commit fixes _bt_unlink_halfdead_page to
do what the redo routine expected.

This code is new in 9.4, so backpatch there.

ashwinstar/gpdb,lisakowen/gpdb,yazun/postgres-xl,50wu/gpdb,jmcatamney/gpdb,yazun/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,xinzweb/gpdb,ovr/postgres-xl,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,50wu/gpdb,ashwinstar/gpdb,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,ovr/postgres-xl,50wu/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,yazun/postgres-xl,ovr/postgres-xl,greenplum-db/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,zeroae/postgres-xl,techdragon/Postgres-XL,xinzweb/gpdb,adam8157/gpdb,ovr/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,jmcatamney/gpdb,lisakowen/gpdb,50wu/gpdb,zeroae/postgres-xl,Postgres-XL/Postgres-XL,adam8157/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,pavanvd/postgres-xl,adam8157/gpdb,ovr/postgres-xl,adam8157/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,adam8157/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,yazun/postgres-xl,oberstet/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,lisakowen/gpdb,techdragon/Postgres-XL,oberstet/postgres-xl,zeroae/postgres-xl,pavanvd/postgres-xl,pavanvd/postgres-xl,pavanvd/postgres-xl,zeroae/postgres-xl,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,xinzweb/gpdb,xinzweb/gpdb