Made provision for more complicated memory

Memory is now handled by the opaque type memory.
Types have been moved from cpu.h to types.h
File memory.h contains forward declarations of the fundamental things
required for a good memory system.
Added immediate opcodes and fixed minor issues.