Pieces are now randomly downloaded. You can also resume downloads
Added transactions, Inserts are slow otherwise in a Sqlite database
added SHA-1 checks + repairs at download end
write blocks to database every once in a while instead of every time a block is written
write blocks to database every once in a while instead of every time a block is written
write pieces only when ready
Reverted code to last stable state
Refactored peer.go
Download should be much more stable. Also added some comments
Made the download much more thread safe by adding peer_manager.go