Detect bytea type in py_param_to_pg_type and convert to right format

psycopg2 accepts buffer, memoryview, bytearray and array python types as
postgres bytea type.