Restore simulation build target

This code was accidentally removed long ago in a botched merge.  This
patch recovers it and makes it build again.  I've done minimal testing
and some necessary cleanup.  It compiles and runs, but it probably still
has a few dust bunnies here and there.

I added registers and pin definitions to simulation.h and
simcode/simulation.c which I needed to match my Gen7-based config.
Other configs or non-AVR ports will need to define more or different
registers. Some registers are 16-bits, some are 8-bit, and some are just
constant values (enums). A more clever solution would read in the
chip-specific header and produce saner definitions which covered all
GPIOs. But this commit just takes the quick and easy path to support my
own hardware.

Most of this code originated in these commits:

	commit cbf41dd4adbdac8bd1ce0288b94266342fb62609
	Author: Stephan Walter <stephan@walter.name>
	Date:   Mon Oct 18 20:28:08 2010 +0200

	    document simulation

	commit 3028b297f31fa805db4c6f5077e1c3edb0ca5099
	Author: Stephan Walter <stephan@walter.name>
	Date:   Mon Oct 18 20:15:59 2010 +0200

	    Add simulation code: use "make sim"