NSCoding

Makes the core classes and some of their descendants conform to NSCoding.  I've checked and double checked the encodings, but if you notice something really bad -encoding an int as an object and such - please let me know.