Ensure indexing by feature id is consistent throughout.

Changed the window lookup to used the dictionary based feature ids, and 
pulled out a bit of code to test and re-use for creating the feature id lookup.


At some point I'm wondering if it's OK to add `minusDays` to Date and use the New and Improved `DateTimeUtils` function?