Refactor models

This a big refactor

- use rails4-way refactoring model modules
- rename `authenticate` and made them more clearly
- remove `Application` model's `model_name` magic
- extract model's non-ORM-specify codes to module(a way to decouple between ORM and model)
- some clean up

The PR may not be merged, but may give some ideas to discussion
This was source of errors in client applications before: https://github.com/doorkeeper-gem/doorkeeper/search?q=Moped%3A%3ABSON&type=Issues&utf8=%E2%9C%93.

Should be tested but I guess it's not, let's leave it as it was.