Fixes for warnings that popped up when compiling with -Weverything (or nearly) with Xcode 4.6

We compile with -Weverything -Wno-gnu -Wno-pedantic -Wno-objc-missing-property-synthesis -Wno-direct-ivar-access -Wno-assign-enum

AFNetworking fails that test.  So here are the fixes for things spotted.  Only compiling on MacOS so might have missed some in iOS only code.