Adding watchdog support and several other enhancements.

This commit adds support for the watchdog timer. If the programs
freezes the Arduino will reset within 8 seconds or inactivity. The
sketch size has also been reduced. There are also a few other
enhancements.