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?
Ah ok I read this wrong. The “Move to calendar” part can go away (as it's in calendar's tests now), but it's fine to leave it for now.