Work in progress: giving a structure to psycopg2.Error

The idea is to store the PGresult there and make the diag independent from the
cursor.

Temp commit: no segfault, only pickle failing.