simulator: Added cache flushing option, instruction cache cleanup

* Added functions to flush instruction and data caches
* Added --flush-caches option to flush caches at a given PC
* Moved method-cache code to .cc file
* Fixed no-instr-cache setup, separate implementation which stores loaded words