Improve test coverage and type coverage for copy_to
Instead of the brittle csv we used to use, use postgresql text mode to transfer
data in the copy
operation.
To check that this change makes sense, add test coverage for bytea[], bytea[][] and timestamptz.
Test Plan
tox tests extended
Migrated from D3394 (view on Phabricator)