Calendar rebase

This replaces #1281.

Fixed unit tests and cleaner history based on Scott's rebase. Unit tests work in latest FF and Chrome but still fail via grunt. @jzaefferer You mentioned an upcoming improvement for asycTests?
Another thing I'd like to bring up for discussion (and another thing that has been here for a long time, so not introduced now) is: date.js is not an external library. But, it's part of the calendar implementation. We should either make it external (and setup a separate project), or move it into `ui` (or even `ui/calendar.js`).