Add protocol reader/writer tests.
Modify test framework to support arbitrary asynchronous protocols.