Refactored m4change datespan filter, and made it default in commcarehq.

@esoergel can you review this function?