Implement backend for new unlocking feature

We'll provide 3 levels of access to unlock assignments:

* Can unlock anything on a designated trail
* Can unlock anything they've completed on a designated trail
* Can unlock specific assignments

This is not yet used anywhere.