Added wakeup counter

Added a wakeup counter to give a count of the number of times the CPU
has woken up. Also fixed a few bugs, it seems to be working now although
the power consumptions seems to be getting unstable.
Also added .map and .out to .gitignore because these files don't seem
like they need to be tracked.