amd64 needs to calculate Maxmem earlier than we init globals, so provide
a KPI to do that. The value it returns is technically inaccurate
because it doesn't take into account excluded regions, but it's a close
enough heuristic for our purposes. It will be readjusted after placing
further constraints on phys_avail once that's been populated, anyways.
amd64 may also be configured to do a memtest on startup, so provide a
page iterator. The iterator function takes flags so that it can operate
over any of: avail pages, noalloc pages, nodump pages, but amd64 will
only use it for iterating over avail pages. We cannot allow mutation of
the region set we're iterating over, but we can allow mutation of the
other region set.