Fix ability to sort by grouped fk-> or datetime_field field
Fix ability to sort by grouped fk-> or datetime_field field

Resolves #1641

zoowii/metabase,blueoceanideas/metabase,dashkb/metabase,Endika/metabase,dashkb/metabase,zoowii/metabase,blueoceanideas/metabase,blueoceanideas/metabase,zoowii/metabase,Endika/metabase,blueoceanideas/metabase,zoowii/metabase,Endika/metabase,dashkb/metabase,Endika/metabase,blueoceanideas/metabase,Endika/metabase,dashkb/metabase,zoowii/metabase,dashkb/metabase