FIX use selected_obj rather the obj throughout groupby

TST dont ignore subselection in groupby
PERF #6570 patch by @jreback
Merge pull request #6570 from hayd/groupby_selected_obj

FIX use selected_obj rather the obj throughout groupby