Refactor models

This a big refactor

- use rails4-way refactoring model modules
- rename `authenticate` and make more clearly
- remove `Application` model's `model_name` magic
- extract model's non-ORM-specify codes to module(a way to decouple ORM and model)
- some clean up

The PR may not be merged, but may give some ideas to disscussion 
Unused method argument - `options`. If it's necessary, use `_` or `_options` as an argument name to indicate that it won't be used. You can also write as `as_json(*)` if you want the method to accept any arguments but don't care about them.