MDL-18375 calendar: added initial PHPUnit tests
MDL-18375 calendar: changed the order of the parameters passed to conform to other core functions
MDL-18375 calendar: removed uses of PHP date functions not present on all PHP installs

Changed the logic of the test calendar so that it does not use the
Julian date calendar as the PHP date conversion functions (eg. jdtogregorian)
are not always present on all PHP installs. Also split the unit test
into multiple tests and rearranged the order parameters were passed to
certain functions as they were changed in the previous commit.
MDL-18375 calendar: changed the test calendar so that it uses it's own logic

The test calendar does not rely on any special PHP date conversion functions (such as jdtogregorian) and is simply 2 years, 2 months, 2 days, 2 hours and 2 minutes ahead of the Gregorian calendar.
MDL-18375 calendar: added a PHPUnit test to ensure the datetime user profile field settings are saved correctly
MDL-18375 calendar: made userdate and usergetdate abstract to ensure developers implement this functionality in their calendar type
MDL-18375 calendar: placed the require_once calls to the top of the unit test page
MDL-18375 calendar: added '\' before each use of the core_calendar namespace
MDL-18375 calendar: removed unnecessary functions for converting years for the datetime user profile field and use existing functions instead
MDL-18375 calendar: renamed the userdate/usergetdate function in the calendar type to be more descriptive

Also tidied up PHPDocs for these functions.
MDL-18375 calendar: PHPDoc tidy up as well as some other minor changes
MDL-18375 calendar: only display the choice of calendar types if there is more than one
MDL-18375 calendar: added the Gregorian calendar type to the standard list of plugins
MDL-18375 calendar: added condition to ensure calendar type exists before loading