Don't call the logging function inside failed transactions

Earlier,

    BEGIN;
    select nonexistent;
    ROLLBACK;

…would crash at ROLLBACK because the logging function tried to do
catcache lookups (via GetUserNameFromId() etc.) in the failed
transaction, which broke:

    2014-04-25 08:31:40 IST [ams:9659] LOG:  statement: rollback;
    TRAP: FailedAssertion("!(IsTransactionState())", File: "catcache.c", Line: 1113)
    2014-04-25 08:31:41 IST [:9650] LOG:  server process (PID 9659) was terminated by signal 6: Aborted

Sprinkling !IsAbortedTransactionBlockState() around solves the problem,
at the expense of not logging commands in failed transactions (which we
didn't want to do anyway). It's probable that it matters only for the
ProcessUtility_hook, but I put it in all three places anyway.

Thanks to Andres for help with the diagnosis.