Added a unit test for emitting nil values. Fixed some Xcode 6 compile issues.
Workaround to keep CBLJSONReader from being dealloced prematurely

I think this will fix #369.