Using models as sources for other models was not working because it was being set as a submodel

* Removed the call to setForeignKey() in addSource()
* Ran a few tests and it does not seem to have affected anything
* TODO: More comprehensive automated tests for the API layer
Used Object.defineProperty() to define virtual fields on instances
Allow view for update to be specified by model

* Affects model validation
Refactor throwing errors on default functions and just log errors instead
Up version on package.json
Update error message on undefined functions to pass back an error object
Check that connection exists before creating a new model
Add a getConnection() function for easier access to DB connections
Fix for model.delete() should use the 'delete' view vs 'all'

* 'all' is special and was causing errors
SITE-1168: Fix crashes when solr is down

* On request error, the server crashes because there is an uncaught
  error on the http request which bubbles to the top level, killing the app
* Add handlers for the error
Merge pull request #12 from beum/SITE-1168

SITE-1168: Fix crashes when solr is down