Add output class for commandline scripts
Improve user deletion script by using DB transactions and a transaction-like protocol of plugin hook calls