Refactored to make it easier to unit test

 - Did a fairly "major" restructure of the plugin to make it easier to
   add unit tests. There have been very little code changes, only where
   required to get the restructuring to work. Therefore I have
   (hopefully) introduced no errors
 - Added a couple of basic unit tests to ensure I had the format correct,
   and to quick tests of the plugin to ensure that at least all the
   variables were resolveable and that the object could be created.
Pulled out date manipulations into functions

 - Initialise the date components when initially retrieving the JSON data
   and merge it into the data. This both isolates the date manipulation
   for later extension, as well as provides a minor performance
   improvement for cached data
 - Extracted out the date matching algorithm so it can be extended
Allow an event to be shown for several days

 - If startdate and enddate are provided in the data, then the event will
   be displayed for this entire range of dates (but the calendar will
   currently only be highlighted for 'date')