Merge pull request #22 from Acubed/master

Fix issues with URI resolution and fragment walking
Check for changes before assigning to instance

Added checks for inequality before assigning modified values back to the
instance object.
This is to prevent undefined being assigned to a property where
previously it did not exist.  This is causing issues when validating
objects that are passed to MongoDB because undefined is coerced to null
by the node driver.
Removed unneeded test

undefined in an array still has positional meaning so no need to check
before assigning it.
Merge remote-tracking branch 'ManThursday/master'
Add check for "properties" schema property which may be undefined
Return the ValidationError instead of the array, add some helper methods

Breaking change, now test for result.valid or !result.errors.length instead of !result.length.