feat: block reference counting

This patch prevents deleting of a block from a vault if the block has
files referring to it. It adds a ConstraintError that is thrown if this
is attempted.

Another patchset will add functional tests for this and hook it into the controllers.