Make leading zeroes optional in date parsing

Make leading zeroes optional in date parsing even if output format
specifies them.

We were running into the following problem:
Our application uses American date style with leading zeroes, i.e. mm/dd/YYYY, and the picker is restricted to today and later.
The user wanted to back-date an item, so typed in the previous day without the leading zero. When the date field lost focus, the month and day values reversed themselves. So 9 June 2012 (6/9/2012) would become 6 September 2012 (09/06/2012).

Also added Jasmine tests.