fix(app): Fix default sort order so it uses index and refactor common method
fix(app): Fix default sort order so it uses index and refactor common method

Fixes #6

Jmlevick/loopback-connector-rethinkdbdash,beni55/loopback-connector-rethinkdbdash,Yoobic/loopback-connector-rethinkdbdash