make forms utility and misc cleanup

https://github.com/dimagi/dimagi-utils/blob/master/dimagi/utils/dates.py#L76