Further work on the calendar API.

The main work was in dbcal.py.
- Removed the class_event table code
- Added constants and functions to make building complex queries easier.
- Added add_event function.
- Refactored my_events and course_events
- Added utility functions:
  - _get_events to execute queries.
  - _first_of_month returns the first day of the current month
  - _last_of_month returns the last day of the current month
  - _convert_string_to_date - a wrapper around datetime.strptime, with default behavior if no date is given.

This update also includes the latest changes from mdipierro/lms299.