When `dateClassObj` is not the native javascript `Date` object,
make sure that `this.value` is always a `dateClassObj`.

Fixes #18394, a problem with hebrew calendars.
Unfortunately I don't have an automated test case since it requires code
in dojox/date to test.

Refs #5074 (the support for specifying non-gregorian calendars), and
refs #11251 (which is when the custom `_set()` method was added that calls `compare()`).