ECPG cursor readahead

https://commitfest.postgresql.org/action/patch_view?id=1195
http://archives.postgresql.org/message-id/522EA559.4090105@cybertec.at