add support for bulk imports with COPY FROM STDIN

- db.Prepare("COPY foo (a, b) FROM STDIN") returns a COPY IN statement
- stmt.Exec(a, b) inserts new items
- stmt.Exec() syncs the input stream, since sql.Stmt.Close() does not
  return errors from stmt.Close()
optimize escapeText for strings without \r, \n, \t or \
update copyin.Exec documentation
adapt copyin to lib/pq changes
directly append encoded text to cpoyin.buffer
flush buffer before the buffer is filled up and needs reallocation
add test for COPY statements with type mismatch
document COPY FROM STDIN
remove duplicate error check

it's unlikely that we get errors from data we just flushed
pass buffer directly to Write and reuse it
test with more data that will actually flush the buffer
update COPY FROM documentation
return explicit error when using COPY TO