Add LINQ query expression builder

I added an extension method which returns the LINQ query that handles
how groups are displayed in the app. I wanted a way to control group
ordering, so now it's possible! There are a couple of flags you can
specify in AppSettings.cs under Global Options.