(2.2) dcache (billing): rewrite triggers to eliminate multiple repeated updates

This is the 2.2 version of patch http://rb.dcache.org/r/5983

Please refer to it for full discussion.

Testing:

as with http://rb.dcache.org/r/5983 (excepting system-test, which does not exist)

Target: 2.2
Request: 2.2
Patch: http://rb.dcache.org/r/5984/
Bug: http://rt.dcache.org/Ticket/Display.html?id=7915
Require-book: no
Require-notes: yes
Acked-by: Dmitry

RELEASE NOTES:

Fixes a problem with the billing database triggers which under continuous heavy loads (> 300 Hz of billing messages) led eventually to an Out-Of-Memory error in the billing domain.
Merge pull request #190 from alrossi/fix/2.2/billing_triggers

Fix/2.2/billing triggers