Validate various RRULE components and simplify logic slightly
Summary:
Ref T10747.
- Validate that all the values are in the proper ranges (this does not yet implement some rules which take more than one value into account, e.g. BYDAY may not be in the form "+1TU" unless FREQUENCY is MONTHLY or YEARLY).
- Use constants instead of magic strings.
- Do array_fuse() mangling earlier.
- Fix a couple of the TODOs around weekday stuff.
- Implement (probably) more of the BY* rules.
- Other minor simplification/cleanup.
Test Plan: Unit tests still pass.
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T10747
Differential Revision: https://secure.phabricator.com/D16603