Use 64 bit buffer lengths.

This is pulled out of the Confuga branch where we want to able to hash large
files. This commit also changes the <hash>_file routines to use mmap if
possible.
Merge remote-tracking branch 'ccl/pull/562/head'

* ccl/pull/562/head:
  Use 64 bit buffer lengths.