Custom ILSGateway - Added historical groups integration

@czue Referenced with this: https://github.com/dimagi/logistics/pull/163