PIM-1325 : add history for groups and refactor changes detection

Todo 
- [x] complete unit tests
- [x] refactor / complete behat scenario
- [x] add group history

Bug fix: [yes]
Feature addition: [yes]
Backwards compatibility break: [yes]
Unit test passes: [yes]
Behat scenarios passes: [yes]
Checkstyle issues: [no]
Fixes the following jira:
- PIM-1325