The build context is now passed as a mutable reference due to the need
to mutate data when adding a model.
Contains small unrelated cleanups and documentation improvements too.
TODO: return the list of models involved in a deadlock.
Note that Many execution errors are not implemented at all at the
moment and will need separate PRs, namely:
- Terminated
- ModelError
- Panic