util: add time-formatting support function

Concept is to use this as a resource, supporting alternative
representations and different max-age values based on the
representation.
test: prepare for 2to3
2to3: eliminate use of filter in list context
2to3: avoid reference to removed methods in Python 3
endpoint: initial message-layer behavior support

At this point we have "send" which creates a cache entry, cache entries
that manage BEBO and state changes related to reply reception, a
"receive" that reads data and records the cache entry.  There's some
initial handling of error cases, but not complete.

Checkpointing what's there so we can move on to evolving the user-level
API.  Expect all this to be significantly refactored after that.
2to3: refactor issues related to urllib.quote

Python 2 does not properly cope with Unicode strings in URL quoting.
Python 3 does do so, and 2to3 does not correctly eliminate the
past workaround.  Simplify life by abstracting the functions.
2to3: refactor issues related to bytes-to-text

Previous solutions ended up generating byte-string literals as the
result of {0!s} in string format operations.  Define a more general
approach for arbitrary bytes-to-display support.