BUG-1845: implement proper shutdown sequence

The notification chain should only invoke the successful callback once
all transactions have been committed successfully. This patch does
precisely that by tracking the number of outstanding transactions. Since
this requires notification about successful transactions, too, we get
rid of the unneeded DOMDataCommitErrorInvoker/Listener abstraction.

Change-Id: I38534a3fb79a8a461059504de7b0cdd48348afef
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-1845: implement proper shutdown sequence"