fix 64 bit warnings, convert to Xcode 5.1, fix unit tests memory leaks