Grid sorter & extensions re-working (MongoDB ODM support)

| Q                   | A
| ------------------- | ---
| Bug fix?            | N
| New feature?        | Y
| BC breaks?          | Y
| Tests pass?         | Y
| Scenarios pass?     | Y
| Checkstyle issues?  | N
| Changelog updated?  | Y
| Fixed tickets       | PIM-2156
| Doc PR              |