refactor: context first in argument list

(merely by convention)

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

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
refactor: taskKey := p.Key() + block.Key()

for clarity and to avoid errors, define a function

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

the less bitswap has to know about, the easier it'll be for readers.
(This now returns Messages.)

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

we've been using maps with peers long enough now that this probably is
no longer necessary

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
add comment to fix race

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
perf: avoid lots of communication by signaling once at end of method

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