Detect bytea type in py_param_to_pg_type and convert to right format

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