Add attendance screen.

Working toward fixing rwarbelow/the_swot_bot#217.

This commit makes attendance a first-class citizen in the application
(meaning it adds a table to track it). Currently, the only way
to access attendance is through StudentAction (and StudentActionType and
StudentActionCategory). That would equate to approximately 3 queries,
per student, per day in the report. This solution gathers the same data
with one query per student.

This particular commit also does a few infrastructure things:

* Add CSV as a Mime-Type so you can specify it as a Rails output (e.g.
  attendance.csv.erb)

* Add .rb as a Template type so you can use plain old Ruby code to
  generate your view instead of ERB (e.g. attendance.csv.rb)
Saving attendance from the live_class creates Attendances

Working towards rwarbelow/the_swot_bot#217.

This commit adds #create calls to the
Teachers::BaseController#save_attendance method to instantiate Attendance
records whenever attendance is submitted.

Adding this Attendance table has sped up the Attendance view by a couple
hundred milliseconds and, in the future, it might be a good idea to
revisit the away that we create StudentActions.

Additional note: ActiveRecord::Base#find_or_create_by_* magic methods
are deprecated in Rails 4. At every possible place, I've used
where().first_or_create to achieve the same effect.
Finishes rwarbelow/the_swot_bot#217.

Added jQuery-UI to add the datepicker functionality to the Attendance
report in lieu of the pagination that was there a few commits ago.

This additionally fixes a bug we found in the attendance creation where
the test for Attendance through the live-class view wasn't verifying
that the Attendances were for actual students, which caused attendance
to appear incorrectly in the view.

There is also a new migration that populates the Attendance table by
searching all the StudentActions for Attendance related actions and
creating records for each one.

We also refactored the student_attendance method in
Teachers::BaseController to use the Attendance table, which sped it up
by a couple hundred milliseconds.
Merge pull request #263 from dugancathal/attendance-screen

Attendance screen