Implement statejoin & fix related bugs
Merge pull request #43 from c00w/join

Implement statejoin & fix related bugs
Mock out record interface inside of heartbeats
Merge pull request #49 from c00w/records

Mock out record interface inside of heartbeats
Nearly completed Priority Log, needs log format.

The PriorityLog is mostly complete, all that remain are assorted logging
functions that aren't really used in this codebase, but could be of use
and implementations of the other priority levels, but those are mostly
the same as PriorityLog.Print. What really needs to be done is the
record.Format method, which determines the output of the log. Reasonable
testing cannot be done without it.

However, let me take some time to explain the structure and defaults of
the PriorityLog. PriorityLog will print a message when received if the
priority level of that message is set in the flag upon creation.
Otherwise, if dispose is not set, the message will be stored on an
internal heap. If dispose is set, the message will be ignored. There is
no individual setting per priority level over whether it should be
ignored or stored.
By default (if a PriorityLog is not used directly) only the error,
standard, and warning messages will be displayed. Everything else
will be discarded. This is to prevent the program from accumulating
memory usage over time. If there will be a way to limit to the amount
of stored messages in the future, this default will change.
Fixed potential deadlock and added more methods.
The deadlock issue was with the possibility of PrintStored never
terminating because of no way to prevent pending from growing, the
addition of another mutex solves that issue (using the mutex already
there would create deadlocks). "More methods" refers to the methods to
log at other priority levels. "Other methods" will refer to methods like
Printf, if it is requested.
Moved log to its own package and split it.

The log itself is now in log.go, everything having to do with the
record structure is in record.go, and the default logger is in defaults.go.
There are currently no options, and the print priority level and method will
be removed and eventually replaced with fatal.
Fix log and add log test.

Using goroutines for logging does not guarantee order, therefore it's
now being done without goroutines. Edited makefile to add support for
making and testing the log package.
Updated all code to use Priority Logger.
Added documentation and created licensed file for Go code

Moved itoa (from Go's log) to Go licensed file.
Optimizations to logging
Change of priorities / choice of formatting
Instead of a print priority, there is now a fatal priority. There are
also now different ways of formatting the log message, using the Println
or Printf formatting style.
Broke Format into smaller chunks.