Refactor CPU outer layers to make more of it reusable between FPGA and Icarus-simulation modes.