Updating the resolving of "$ref" attributes in schemas to merge over existing values

The current $ref implementation completely replaces a schema, but I think it should augment a schema and replace any conflicting keys (see https://github.com/justinrainbow/json-schema/blob/master/src/JsonSchema/RefResolver.php#L192).

Closes #501