Fix timeout logic with failed transactions (#16)

Timeout now works as specified with transactions that fail. The documentation
specifies that logic would be confused with SET statement_timeout statements
or a non-infinity default value in postgresql.conf. Eventually, the timeout
could be saved to avoid setting and resetting it each time a statement
is executed with a given timeout (this optimization requires to determine
whether the session is within a transaction).