Simplified Apps.get_model and added AppConfig.get_model.

Documented them as public APIs.
Changed get_model to raise an exception on errors.

Returning None on errors led to unpythonic code, as the changes in this
commit show.