Add shutdown transaction support

This PR is ready for merge **but** it still contains a commit which adds a
shutdown-transaction in the configuration file. I would remove this commit
before merge!

Feel free to review.

Pair-programmed-with: Marcel Muller <com2040@gmail.com>