Fix issue where non-string '$ref' properties were assumed to be references

Prior to this patch, z-schema would assume any '$ref' property on an object was
a reference.  When this happened, numerous locations would fail due to this
assumption.  I updated the locations I could replicate.