NSSecureCoding implementation

Finally got around to doing this. I'm not totally happy with the implementation though, due to a bug in the way that NSSecureCoding handles container classes. If you have any alternate suggestions I'd be happy to hear them.