Fixed iOS framework compilation warnings

- Fixed or disabled some warnings produced by clang compiler during iOS frameworks build.
- Extracted same block from some cmake scripts (add_apple_compiler_options).
- Updated `platform/ios/build_framework.py` script to break the build in case of error in cmake or xcodebuild steps. This change allows buildbot to handle these cases better.

Do we have something similar to `#define PNG_UNUSED(param) (void)param;` to mark unused parameters?