Move files from app/models to lib

- Move classes and modules that are not model-like (that don't do
  persistence) into lib.
- Update autoloading in the engine's bootstrapping as a result of this
- Clean up some autoload statements in krikri.rb as a result of the
  autoloading changes.