Refactor bitmap heap scan in preparation for parallel support.
Refactor bitmap heap scan in preparation for parallel support.

The final patch will be less messy if the prefetching support is
a bit better isolated, so do that.

Dilip Kumar, with some changes by me.  The larger patch set of which
this is a part has been reviewed and tested by (at least) Andres
Freund, Amit Khandekar, Tushar Ahuja, Rafia Sabih, Haribabu Kommi, and
Thomas Munro.

greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb