PIM-3458 Automatically set next sort order when creating an attribute group

| Q                    | A
| -------------------- | ---
| Bug fix?             | Y
| New feature?         | N
| BC breaks?           | N
| CI currently passes? | ?
| Tests pass?          | Y
| Scenarios pass?      | ?
| Checkstyle issues?*  | N
| PMD issues?**        | N
| Changelog updated?   | Y
| Fixed tickets        | PIM-3458
| DB schema updated?   | N
| Migration script?    | N
| Doc PR               | ~
please avoid to use build() this method and support has been dropped in 1.3, it will not work (come from the parent of referable entity repository and do some magic calls), prefer use createQueryBuilder etc