spacemanager: Maintain aggregated fields with database triggers

Moves the logic to maintain aggregated fields in srmlinkgroup and
srmspace from Java code to database triggers.

This is a proof of concept implementation that only adds triggers
for HSQLDB. The patch will be updated with PostgreSQL triggers.

Target: none
Require-notes: yes
Require-book: no