Use mmap with madvise for checksumming phase

I've tried adding your idea to use mmap and madvise for checksumming. Please review and merge if it looks okay. I did no extensive tests but seems to work.

There are a few caveats which I couldn't fix due to not knowing how the rest of the code exactly works, i.e. how to skip files as these will return EINVAL on mmap. I put appropriate comments into the code.