perf(mux) use RWMutex
Merge pull request #218 from jbenet/fix/2014-10-29-mux-rwmutex

perf(mux) use RWMutex
Revert "perf(mux) use RWMutex"
Merge pull request #219 from jbenet/revert-218-fix/2014-10-29-mux-rwmutex

Revert "perf(mux) use RWMutex"
fix(bitswap) duplicate key in wantlist

@whyrusleeping noticed this a couple days ago

potential long-term fix: prevent duplicate entries in the wantlist by
using a map/set and iterating over this data structure on export
style(bitswap/message) rename AppendWanted -> AddWanted

implementation will be patched to ensure bitswap messages cannot contain
duplicate blocks or keys
refactor(bitswap/message) use map to prevent duplicate entries

A nice invariant for bitswap sessions:

        Senders and receivers can trust that messages do not contain
        duplicate blocks or duplicate keys. Backing the message with a
        map enforces this invariant.

        This comes at the cost of O(n) getters.
style(bitswap/message) rename struct

so there's one less name to think about
fix(bitswap/message) impl with map to ensure no duplicate blocks

comes at the cost of O(n) Blocks() method.
style(bitswap/message) rename method -> AddBlock

to emphasize idempotence
test(bitswap/message) no duplicates
style(bitswap) rename variable to 'routing'
style(bitswap) rename Adapter -> BitSwapNetwork for clarity
rename var
refactor(bitswap/network) rename -> BitSwapNetwork

remove 'adapter' concept
instead, describe the component as the bitswap network

it's still an adapter, but it's just not necessary to describe it as
such
refactor(core, bitswap) split bitswap init into two steps

@jbenet
refctor(bitswap/network) replace Network interface with Dialer interface