it's not a queue yet but it's okay to name it as such

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

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

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

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
refactor: re-use wantlist.Entry type wherever it makes sense

it seems to make sense since, in each place, the Key and Priority
represent the same information

b/c you know the saying...

"It is better to have 100 functions operate on one data structure than
10 functions on 10 data structures."

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

Before, priority carried two pieces of information.

One: priority as defined by remote peer
Two: whether task is trashed

This assumes the protocol is defined for natural numbers instead of
integers. That may not always be the case. Better to leave that
assumption outside so this package isn't coupled to the whims of the
protocol.

The protocol may be changed to allow any integer value to be used.
Hopefully by that time, new responsibilties weren't added to the
Priority variable.

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