SPRNET-1568

Only checking timeout and flushing if transaction is not readonly and
session is dirty.