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. 

Implementing this patch broke the file assignement tests because those tests actually deleted blocks assigned to files. That large test was broken into individual tests. 
Depending on where we have retrieved vault_id and block_id, we may need a validation on these two values here or somewhere.  

If block_id is None, does db queries break?  I tried, and it seems None does not break Line 223, but please confirm.