Add Chord windowing reducer logic and tests

Opening this up for PR as part of the "one PR-ish a day" strategy (which is a good idea). This is a tricky little bit of logic and is worth reviewing on its own. I've made the change such that it currently doesn't affect production, as we require chord-squash (unfortunately).

/cc @raronson be good to get your eyes on this one as well.