Secure coding fixes

Additions to the NSSecureCoding work (#70) that I had to make to make this run with my existing project that uses XPC & NSSecureCoding.

I documented the reasoning behind all of the changes I made, either as a comment in the code or in the commit message.