x86: clean up reserve_bootmem_generic() and port it to 32-bit