iOS 7 tintColor support for bar button item and fixes for static analysis warnings.

Here i've fixed some warnings found by analyzer in Xcode 5, and I've also added support for the new tintColor property in iOS 7 on the bar button item. This suppord is toggleable with a new property that is on by default. The new property has no meaning on iOS 6 and below.