Use new typesafe enum macro. Run analyzer.

This helps guarantee that all switch cases are properly handled.

Assumed that SVPullToRefreshStateAll should be treated the same as SVPullToRefreshStateStopped in existing switch statements, since SVPullToRefreshStateAll is an invalid state for those. assert(NO) would also be appropriate.

Turned on static analyzer since defining the SVPullToRefreshStateAll cases in existing switch statements fixed all analyzer warnings.
Merge branch 'typesafe_enum_and_analyzer' into master2