x86: Refactor the zboot innards so they can be reused with a vboot image