[WIP] Family and completeness sorters (MongoDB support)

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