Improve escaping of `COPY FROM` data
Improve escaping of `COPY FROM` data

Fixes correct escaping of some existing characters we handled, and adds
support for escaping the backslash, newline and carriage return characters
properly in `COPY FROM` data. The PostgreSQL documentation of the `COPY
FROM` command states that backslash and delimiter character must be
escaped, in addition to newline and carriage return.

In addition the support for handling PHPs magic quotes feature is
removed, as this feature was removed from PHP 5.4, and the
`get_magic_quotes_gpc` function would just always return `false`.

eliksir/kolibri