KAFKA-17819 : Handle piggyback acknowledgements when subscription changes in ShareConsumeRequestManager.
What
Currently in ShareConsumeRequestManager, after we receive a ShareFetchResponse, if the subscription changes before we acknowledge(via ShareFetch), then we do not acknowledge the records which are not part of the updated subscription.
Instead we must acknowledge all the records that we had received irrespective of the current subscription.
This bug is only when we are acknowledging via ShareFetch where we use SubscriptionState::fetchablePartitions to obtain the partitions to fetch.
In ShareAcknowledge, as we are getting the partitions from the active share sessions, even if the subscription changed, the session would remain active.
In future, we would ideally refactor to make the ShareFetch also use the active share sessions instead of SubscriptionState.