fix the occasional message "Found an orphan block in the blockchain. If this message persists, please report it.

It happened when I block appeared in the bitcoinqt blockchain while processing new block headers. Fixed
by keeping a note of where we finished reading block headers so that reading blkdata stops here.

Also, created a typedef for the pair that represents position in the blk files (fileno, offset).

Also created a gtest for this all