fixed project warnings
fixed some warnings
fixed some memory warnings from static analyzer
better handle null rect
Merge pull request #167 from xlc/fixes

Fixed warnings from static analyzer. Fixed an exception when view "imageWithSinglePointPath" in iOS demo project.