Generate slug when adding new app.

No issue
- Remove duplicate code from model_posts_spec.
- Add slug generation to app model
- Test slug generation on app model