Implement stateinformed using 3 phase system
Merge remote-tracking branch 'Sia/master' into stateinformedv2
Fix whitespace of src/common/hash.go
Whitepaper roughdraft in tex; gitignore update

Whitepaper added to the doc/ folder, is currently incomplete and in
rough draft status. It's mostly complete and accurate up to the 'Proof
of Access' Section.

gitignore updated to ignore all .pdf, .log, .aux, and .toc files,
because compiled latex and logs should not appear in the repo.
Merge branch 'master' of github.com:Siacoin/Sia
Fixed git merge errors and fixed naming errors

Heartbeat is considered one word, and should be capitalized like one.
Completed SteadyState and fixed minor issues

StateSteady is completely untested, but it compiles... Also removed an
argument from NewHeartbeat because it wasn't being used, and filled in
the arguments for NewStateSteady in stateinformed.go.
Clear Heartbeat storage on handling of new Block
Fixes to StateSteady and Rendezvous Hash

StateSteady no longer feeds itself its Heartbeat and Blocks, but rather
waits for the NetworkMultiplexer. Furthermore, the key argument for
RendezvousHash now is useful.
Created test and kill mechanism for StateSteady
Added documentation and logging to StateSteady
Fixed StateSteady test

One issue was calling Die on a state that could possibly not have that
method. A Die method should be added to State interface, to allow for
easy transitions.
Switched storage of Heartbeats from list to map
Allows for recording of which host sent the heartbeat, and allows
rejecting of heartbeats from hosts which have sent their heartbeats for
the current block.
Fixed Stage2 init in initial Steady heartbeat
Modified constructor for StateSteady and usage in StateInformed to pass
secret string for first heartbeat.
Updated RendezvousHash key and seen host check

The rendezvous hash for selecting a block compiler now uses the DRNGSeed as its
key instead of the previous block id. StateSteady now checks whether it
has seen a heartbeat from a host before accepting it as the new
heartbeat (can modify so if received a heartbeat from a host that does
not match the heartbeat previously received, ignore it).
Updated statesteady test function calls
StateSwarmInformed.Die now takes a boolean value and NewStateSteady
takes a unique secretstring (set to the name of the blockchain host
for lack of a better setting). WARNING: This will almost certainly fail
if verification is done on the new heartbeat with the previous
heartbeats. Replacing the constructor for the Blockchain (private to the
test) should work.
Initialize Heartbeat map in constructor
Change source of storagemapping in Steady
Reduced waiting time of Steady test
Fix race condition in Steady test.