Only conditionally encode weak properties by default

unsafe_unretained is too tricky, because it also corresponds to the
memory management policy of non-object properties, and apparently
readonly object properties are treated similarly.