Fix the issue that GroupBy may not call 'unsubscribe'
Propagate onError to all groups
Add a new state of `terminated` to fix the race condition of `errorEmitted`; Add more comments.
Update as per review
Merge pull request #1967 from zsxwing/fix-groupby-unsubscribe

Fix the issue that GroupBy may not call 'unsubscribe'