Complete rework of the statemachine

New statemachine allows for idle/cool/heat/fan modes and utilizes a
decision state to move between modes.
Add clock thread

Statemachine is now updated by a clock thread that ticks every ten
seconds. There's still a lot of debugging code.
Started rewrite
Adds pid methods and logging class
Remove log.deleteme
Fix logger file writing bug

Until now the log file was only written when the program terminated. This is
a result of buffered output, flushing the log each time something new needs
to be written has solved the issue.
Add pid file writing

Pid file is written as soon as the process is daemonized.
Check pid before forking process

Pidfile was checked after the process was forked. It makes more sense
to check the pid file (verify the program isn't already running) before
the process is forked.
Add log_exception method

This new method takes an exception as a parameter and prints all
pertinent info to the log (including stack trace).
Remove unneeded Thermostat:: code
Add Settings module

Settings module stores thermostat settings and controls access. Mutex
is used to ensure that settings aren't corrupted if two processes try
to access simultaneously.

Also trapping SIGUSR1. Using for debug purposes currently but it will
cause the statemachine to clock eventually.
Add Relays module to control physical relays

Relays module will control relays but it's just a placeholder at this
point. Eventually it will contain the commands require to turn the
relays on and off.
Change heating/cooling/fan defaults to on (true)

The default set points are reasonable enough that the cooling and
heating can be enabled by default, and the fan defaults to on for
testing purposes only. Before this goes live the fan default will
be changed back to off (false).
Add Sensor module for reading temperature sensor

The Sensor module is a placeholder for now. It returns a random
temperature when reading method is called. This is just for testing
purposes, it will be set to read the temperature sensor once testing
is complete.
Add statemachine and context

The statemachine models a physical thermostat. The statemachine
itself holds the "state" and the context holds all of the logic.
Add unix socket listener

Using eventmachine to listen for connections on unix datagram socket.
The socket expects a marshalled hash for now but that will likely
change since it limits interactions to ruby processes.
Remove old/ files

old/ directory was some code left over from the "proof of concept"
stage. Some of it has been moved into the new code but most of it
isn't needed any more.