Fix issues that GroupBy and Sample doesn't call 'unsubscribe' and also NPE when the key is null in GroupBy

Fix #1958
This is crazy complicated logic. This operator was re-written 3 times I think to get all of that right so I'm trusting that the unit tests are making sure we're still correct. 

We can not unsubscribe the inner groups when the outer receives an unsubscribe, they must all run but now we just don't emit any new groups.

The reason is that something like a `take(2)` on the outer is saying "take 2 groups", it's not saying "take 2 items from whatever groups they come from". So "take 2 groups" and then let the data flow through those groups. It's then up to those groups to finish or unsubscribe.