Fix buggy commit d2b636accacf481589387fcd7d659817ad05f1cf

I fixed the bytea bug I mentioned yesterday, along with the unit tests that were testing bytea incorrectly.  All tests except Bug1010788 UpdateRowSource (which appears to be failing legitimately) now pass.