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?
Yes and no as these tests interact with the input and the calendar elements. So this tests for the correct focus handling and interaction between datepicker and calendar.