Added a C structure to psycopg.Error

This will allow to store a PGresult in it.
Store a PGresult in the Exception error

This makes the Diagnostics independent from further operations on the cursor
and allows using it with exceptions not generated by a cursor.
Added tests to verify the new Diagnostics properties

diag can be used on exceptions raised without cursor and is independent from
the cursor.

Docs updated to reflect the changes.
psycopg2.Error object and type renamed more consistently
Merge branch 'diagnostics' into devel
Notify and Xid objects and types renamed for consistency

They were the only objects starting with uppercase. My fault.
Use Py_CLEAR on self->query instead of if and decref
Dropped IFCLEARPGRES macro

PQclear already guards against NULL, so the extra check is redundant
Dropped "customized" pg_free functions

The defaut is already to call PyObject_GC_Del.