Patch for mhical to support "BYDAY=-1SU"-type RRULEs.
Notes:
- Added dmlastday() function to dtime.c, to obtain last day of month.
Minor modifications to other parts here to reuse code.
- Modified rrule_clock() in datetime.c to handle negative BYDAY
correctly.
- Added a couple of tests.
- Mainly this is to scratch an itch since UK timezone history makes
heavy use of BYDAY=-1SU-type RRULEs, and the resultant complaints
are annoying. I had a brief look at "properly" extending
icalparse.y, but I kindof think any serious extension of mhical
should really instead adopt libical?