Add tests to ensure sort preserved by groupby, add docs
xref #9651
closes #8588 

Adds test to ensure the sort of a target object is preserved within `groupby()` groups, modifies docs to make it clear sort is preserved within groups. 
