Add simple control processor, fix branches

* Make control processor work with MTPCR and friends.
* top_test will stop the processor when tohost is set to nonzero.
* Add some software tests.