Rather than separate $dbw->startAtomic() / $dbw->endAtomic() calls, have something like:
wfGetDB( DB_MASTER )->performTransaction( function ( $db ) { $db->update( .... ); $db->delete( .... ); } );
This would allow nested transactions (among other benefits).
A special return value could be used to indicate that the transaction should be rolled back.
Ideally the same interface would allow deferred updates, too, without needing to nest closures. Perhaps by having performTransaction() take a flag which indicates whether to invoke the closure now or whether it may be deferred.