Fix bug when clearing contexts from project

Simulation steps:
-In the user home page, find project with at least one context
-Click the projectify icon next to that project
-Uncheck all contexts for the project
-Click "Save Project"

Problem:
Application dumps back to user home page, but contexts are not updated.
This is because the Project::getContextChanges method expects an array
and not a null value.

Resolution:
Add default value 'null' for the $inputs parameter and added code to
convert a null value to an empty array.
Merge branch 'project'