[GATEWAY] Cleanup LocalGatewayShardsState

This commit tries to cleanup LocalGatewayShardsState to be more efficient
and easier to understand.