Merge pull request #63 from mikedewar/daemon

:+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1: :+1:
fixes to make this version work
only one definition for blocktype now
made types much less confusing and even removed one
Merge pull request #65 from nikhan/daemon

working version + lots of cleaning & simplifying
NewBlock returns an error if it can't find the block in the library; added random block