spacemanager: Maintain aggregate columns with database triggers

Moves the logic to maintain aggregate columns in srmlinkgroup and
srmspace from Java code to database triggers. Adds not-null
constraints to several space manager database columns. This may
take a little while to apply on large databases.

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