Add an iterator helper for operating on /proc/[tid]/maps.

The next step is to have the checksumming code share more logic by
using the iterator.

Also removes a fair amount of code that turned out to be dead.