Read in blocks of 64K

It's a better tradeoff between the performance of the 1MB reads and the
granularity of 512 (or 4096 for "Advanced Format" disks).
Add forgotten median.h include file
Add random scan mode