Extract ORM specifics

rework of PR #454

ORM specifics except Active Record has extracted to [doorkeeper_bundle](https://github.com/jasl/doorkeeper_bundle) (not push to rubygems yet)
I think it's difficult, because the dummy app is pure for active record now.
the test cases can be reuse, but dummy app can not