Rewrite gngrams to use mmap'ed IO.

For data sets already in the page cache, this makes little
difference, but for cold data it is approx. 4x faster.