Minor code cleanups; addition of block comments for a couple more functions.
Allow `$ref` directives to override portions of a subtree during rewriting.

This provides a mechanism for overriding small portions of a subtree referred to
by a `$ref` directive during the reference rewriting phase. Extra properties
found in a `{ "$ref": "#/library/subtree" }` will be merged in to the subtree
after the reference is resolved and rewritten. Objects and arrays are merged
recursively instead of by simple replacement, which lets you, for example,
refer to:

  `{ "subtree": { a: { b: { c: { d: 1, e: 2 }, g: 1 }, h: 1 }, i: 1 } }`

using the following reference directive:

  `{ "$ref": "#/subtree", a: { b: { c: { d: 0, f: 9 } } } }`

to obtain a rewritten result of:

  `{ a: { b: { c: { d: 0, e: 2, f: 9 }, g: 1 }, h: 1 }, i: 1 }`

This actually doesn't add much code; see `_merge_override_properties` in
`lib/reference.js` for more information.