Add unit tests

Based on the discussion at the 7/2/2013 meeting, it sounds like there will be a flurry of functionality changes to Baron to allow for things like different access policies at different times of day.  I added some unit tests to help make sure we don't break any existing functionality as we hack new features, and so that new people to the codebase (such as me) can make changes without access to running it on the actual hardware.

I tried to make as few changes to the existing code as possible, though I had to change the structure of door_loop() a bit to make it testable.