Refactor to fix unresolved import in models

The model code depends on FigoException, which resides in figo. figo
itself depends on models.

To avoid a circular dependency, the exception was refactored out into
its own package.