Add onClear callback and clearInvalidInput option

- Cleaned up `setDate()` so both null date and invalid date string
clear the current selection.
- Extracted `clearDate()` method from `setDate()` for clearing the
current selection with options for clearing the input field (if set)
and preventing `onClear` callback.
- `onClear` callback is called by `clearDate()` so users can be
notified of invalid/empty date. The user's callback can get the field
text value to show a required validation message if empty or invalid
date validation message if not empty.
- `onSelect` and `onClear` are useful when integrating with MVC
frameworks such as Knockout.js and Ember.js where `onSelect` and
`onClear` sets and clears the component's date value.
- `clearInvalidInput` option can be set to `true` to automatically
clear the input field value (if `field` is set) on invalid input.