Make error logging in peer.go unique.

Helps tracking down errors.
Don't propagate inv messages to connecting peers.

Only queue messages for peers that have finished connecting to prevent
filling goroutines and causing deadlocks.
Bucketizing for addrmanager

Implement the bucketing by source group and group using essentially the
same algorithm as the address maanger in bitcoind.

Fix up the saving of peer.json to do so in a json format that keeps bucket
metadata.

If we fail to load the some of the data we asssume that we have
incomplete information, so we nuke the existing file and reinitialise so
we have a clean slate.
move the intiial chain cache generation into bm.

Blockmanager is otherwise the only current consumer of chain and it is
messy to do it outside of it.
Keep track of currently requested blocks per peer.

Use this information so that we do not request a block per peer we got
an inv for it, makes multi peer much quieter and rather more bandwidth
efficient.

In order to remove a number of possible races we combine blockhandling
an synchandler and use one channel for all messages. This ensures that
all messages from a single peer will be recieved in order.  It also
removes the need for a lot of locking between the peer removal code and
the block/inv handlers.
Revert "Comment multi-peer connect while code is under dev."

This reverts commit 7609ff396ad209c9dd21fef3b026081898ad3912.
Disconnect misbehaving peers who send unsolicited blocks.
Fix shutdown hangs.

We would occasionally hang or a while during server shudown, this is due
to an outbound peer waiting on a connection or a sleep. However, we
don't actually require to wait for the peers to finish at all. So just
let them finish.

Secondly, make peer.disconnnect and server.shutdown atomic varaibles so
that checking them from multiple goroutines isn't race, and clean up
their usage.