Create segment handling code up to the top level. Move it all into
seg.c, and make necessary adjustments for it being in a new file,
including inventing print_avail() and first_avail() to print the array
and find the first large enough memory hole.aarch64 will use this,
and I'll refactor the other platforms to use it as I make them work.
Sponsored by: Netflix