Interval filters now properly handles all edge cases.

This required a re-write of the algo because the old one, while clever
and efficient, didn't handle the case where a config would have two
ranges with a hole in the middle. In other words, all ranges for a
config would be merged into one range that spans all the other ranges.