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)
but if not run full tests, it may have some issues that can't be found out (like <https://travis-ci.org/jasl/doorkeeper/jobs/31586907> )