#258 add framework for discarding prepared transactions and doing a dirty shutdown