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
Added the ability to read list and count from a mongo collection
Perform a check if a model has already been initialized

* Prevents a mongo model from being defined twice
Updated instance date serialization to UTC time
Allow 0 to be a value retrieved from the DB
Fixed error in retrieving total number of search results from solr
Updated the AbstractModel to set the view on an instance

* The instance will use its set view by default
* For model references use the view with which the data was called
  to implement the reference
Merge pull request #13 from beum/SITE-1361

Updated the AbstractModel to set the view on an instance
Fixed querying issue and buffer concatenation in solr client
v0.2.18 - Added the concept of data filters vs views

* Data filters determine which fields get included in the view
* Views determine what gets output to the user