MDL-18375 calendar: added the usergetdate function to the calendar type

Also added an additional abstract function necessary for converting dates from the Gregorian calendar.
MDL-18375 calendar: refactored the datetime user field so that it now uses the calendar type system