Improve error reporting, providing HINT, DETAIL and CONTEXT as separate entries.

The PostgreSQL protocol defines error fields with some precision, as can be read at http://www.postgresql.org/docs/current/static/protocol-error-fields.html.

This patch improves the database-error condition to expose important fields separately and fixes get-error so that news fields are properly filled when an error occurs.

Sorry about the mess in terms of commit history in that pull request, it seems I started from a unclean repository. The diff seems ok though, and 32ff43226651ed39725301b537751e16ed58e6b9 should be the only patch to consider here.

I'm going to need the CONTEXT separately in pgloader so that I can parse it to better handle COPY errors.

Happy Christmas,