beginnings of a bitswap refactor
dont panic on empty wantlist
test(bitswap)

@whyrusleeping This appears to be a timing issue. The asynchronous
nature of the new structure provides has the bitswap waiting on the
context a bit more. This isn't a problem at all, but in this test, it
makes the functions return in an inconveniently timely manner.

TODO don't let the test depend on time.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
events(bitswap) try the new event logger in the bitswap GetBlock method

@jbenet
@whyrusleeping

Let me know if you want to direct the eventlog output to _both_ the file
and stderr. Right now it goes to file. Perhaps this is just a minor bip
in the larger discussion around log levels.

https://github.com/jbenet/go-ipfs/issues/292

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(bitswap) handle error

@whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(bitswap) consistent event names

@whyrusleeping @jbenet

since the logger is created with package scope, don't need to specify
the package name in event messages

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(log) ->f

@whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
use event logger here too?

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
clarify MessageReceived contract

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
naming

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
constify to make it clear what _can_ and _can't_ change over time

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
some renaming

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
simplify

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
misc(bitswap) renaming

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
added a new test for a dhthell scenario that was failing
move some variables into strategy
fix tests halting
remove buffer timing in bitswap in favor of manual batching
randomize rebroadcast target
style(bitswap/notifications) make it more obvious

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>