pgsql: Drop termination lock even on exceptions. Prevent cancelquery() from starting the statemachine. This was responsible for the majority of the exceptions.