[#701] Add a button to coaching case to notify case manager, change how
notification is recorded

* Rough cucumber feature for the notify case manager button
* cleaning up old "*_case" factory_girl aliases
* Adding button to form page, along with new route, and functional tests
* Adding check to make sure the kase is persisted before displaying the button
* Hooking up notification button to a new notify_manager action on the
  KasesController. Also removing all references to the
  Kase#assessment_complete method.
* Cleaning up and refactoring some cucumber steps
* Adding scenario to test that trainers can't send a notification email if no
  case manager has been assigned
* Adding test to ensure the notification button is hidden on training cases
* Adding the Prickle gem and switching all native selenium javascript dialog
  interactions to use Pickles abstracted popup methods
* Adding tests to make sure the notification button can be clicked more than
  once, and that the button should issue a javascript warning if the form data
  hase changed without being saved.
* Adding some better styling to the notification button.
Merge branch '701-add-a-button-to-coaching-case-to-notify-case-manager-change-how-notification-is-recorded'
Making referral_source required only for TrainingKase objects
[#691] BUGFIX Updating kase functional tests to reflect that referral_source
need only be populated for training kases.
[#688] Add middle initial to customer model

Adding middle initial field to customer form between first and last name
fields. The new field is not required and is capped at a maximum length of
1 character, by both the form control and a validator on the model.
Adding asterisk to Preferred Phone Number label on the customer form
[#680] Add ability to go to an assessment request from customer or coaching case

Adding a list of assessment requests to customers' profiles, as well as a link
to the assessment request details from coaching cases created from ARs.

* Adding assessment request association to customer model
* Slight refactoring of the check_simple_table_data method in the common_steps.rb file
* Adding integration tests to assert this new feature
[#695] Fix possible user privilege elevation bug in user form, make treatment
of all "Staff Organizations" consistent

New Users can be assigned permissions when any staff organization is selected,
not just the "root" staff organization. I also combed for any other instances
where the "root" organization was being referenced by ID ("1"), but most of
these had already been converted back in commit 38c3f201.

* Reverse order of permissions in new user form
* Adding JSON format to Organizations index to facilitate looking up an
  organization's org type from the New User form.
* Updating New User form so that it looks up the org type of the selected org
  and displays the permissions select if applicable
[#730] Assessment request filtering: user-selected filters should persist when user refreshes page

Updating AR controller to store filter form state in session variable and reapply on (re)load
[#677] Add ability for ability to assign an assessment request to a Ride Connection user

ARs can now be assigned to staff organization users. Only inside users are
able to make the assignment; outside users will not see the field nor the name
of the assigned user. Inside users can also filter the index list of ARs by
assignment (either their own or everyone's).

* Adding assignee_id attribute and assignee association to assessment request model
* Removing validation to enforce assignee, since one shouldn't be required. Adding spec to test assignee association.
* Adding assignee field to AR form
* Updating redirect path for AR creation and edit to selectively go to the Dashboard for outside users.
* Refactoring a few common steps
* Adding assigned_to scope for AR model
* Adding Assigned To column to AR index, and form options to filter by assignee
[#679] Add ability to have contact events associated with assessment requests

Contact events are now polymorphic and can be assigned to either a customer,
an assessment request or a kase. Contact events can only be added to ARs until
a kase has been associated.

* Refactoring contact feature file
* Changing the Contact model to use a polymorphic association rather than specific <model_name>_id columns
* Adding a new gem to help with Polymorphism and STI models; updating integration tests to be compatible with new polymorphic contacts
* Adding contacts to the AR pages
* Making sure contact events can't be added to an AR after a kase has been assigned
Fix a typo in the latest migration.

contactable_type was duplicated, should've added indexes on contactable_type
and contactable_id.
Fixing some accumulated regression errors that were preventing me from doing a migration and sandbox load from scratch
Making sure AJAX functionality is applied to assignee filters on the AR index page, and beefing up the integration tests to better excercise that feature
[#679] BUGFIX - Suppressing validations in latest migration file in case contacts are linking to deleted customers and/or kases.
[#679] BUGFIX - Updating default message when a contact's associated contactable object is invalid.
Minor fix: Uncomment line in migration.
Some README revisions.

* Brought documentation up to date.
* Added some additional deployment information.
* Cleaned up Markdown syntax.
Merge branch 'master' into stable

Conflicts:
	app/controllers/surveyor_controller.rb