Add staves API to backend, and refactor test utils.

A convenience method has been added to allow easy creation of parent
records in API tests that need them to test CRUD actions for children.
Add handling for sketches without any measures.
Use 400 response code for failed API operations.
Add support for ID modifications in local storage associations.
Add voices API to backend.
Add specialized writer for nested association data.
Add association to store nested data on WebStorage proxies.
Properly mark parent records dirty when associated records are modified.