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.
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.
Reduced scope of code copyrighted to Go's authors.
Change log in codebase to be the common log.

This commit changes all code to use common/log instead of Go's log.
Also, all uses of print were changed to Debug unless they were Fatal,
this may not be the correct priority level so do not be hesitant to
change it. The available levels are Fatal, Error, Warning, Info, and
Debug, formatting the message as in Println and Printf is also
available, just use the associated level and attach "ln" or "f" to it.
Merge pull request #48 from Jonbeek/Log

Priority Log
Merge branch 'master' of github.com:Siacoin/Sia into rsc
Add longhair, library for Reed-Solomon coding
Attempting to build longhair into the go package

to build using gcc call:
gcc bridge.c -Llonghair/bin/liblonghair.a longhair/BitMath.o
longhair/MemSwap.o longhair/MemXOR.o longhair/cauchy_256.o -lstdc++
forgot to commit constants file
tentative and untested: EncodeRing is complete
spelling in comments, memory is managed correctly
switched longhair to a Siacoin fork
Merge pull request #46 from DavidVorick/master

Whitespace, penalties, dishonest blockchains
Merge branch 'master' of github.com:Siacoin/Sia into rsc