Update Demo projects

Update build settings as recommended by Xcode 5 and fix all build and analyzer warnings