Fix various problems with pq.CopyIn

The biggest change is that COPY is only allowed inside an explicit
transaction; see #214 for an explanation of the problems, and why
this change is necessary.

While changing the behaviour, I noticed and fixed a few other
problems as well:
  - Rogue COPY commands sent by the user were not recovered from
    properly.
  - CopyIn() and CopyInSchema() previously did not properly escape
    the identifiers.
  - Close() now returns an error if the stmt has been previously
    closed.
  - Some fixes to the general style in tests and documentation.