KAFKA-20736: Improve removal of unassigned partitions from share sessions (#22720)