Use byte strings for binary data in tests

Fixes most test failures on Python 3.  Two test failures remain: one
because ZODB uses a newer pickle protocol on Python 3, and the other one
because you can't .encode('hex') in Python 3 any more.