Resolve race condition.

While exceedingly unlikely, the old construct introduced potential race condition where it checked wself first, and assigned sself second. This now assigns sself first, and then checks that, which is the correct pattern, already used elsewhere in SDWebImage.
Adjusted completion logic in prefetcher, as the old implementation would finish prematurely if any requests were skipped.

Also adjusted documentation in headers to make it clear that the `finishedCount` includes both successful and unsuccessful requests.
support for image orientation
Return nil from SDScaledImageForKey if the input image is nil. Replaces #750. Fixes #365
Merge pull request #751 from robertmryan/master

Avoid premature completion of prefetcher if request fails
Merge pull request #764 from n13/master

support for image orientation
Fixed a warning in the demo project
Reordered categories in project file
Added doc description for the NSData category
Missing new line
Pass image URL in completion blocks - step 1:
- deprecated block type `SDWebImageCompletedWithFinishedBlock`, replaced with `SDWebImageCompletionWithFinishedBlock` that contains NSURL* param
- deprecated SDWebImageManager `-downloadWithURL:options:progress:completed:` method. Replaced with `downloadImageWithURL:options:progress:completed:` that uses the `SDWebImageCompletionWithFinishedBlock ` as completion block type
- created Deprecated category for SDWebImageManager containing the old method
- replaced the usages of the deprecated items with the new ones
Pass image URL in completion blocks - step 2:
- created block type `SDWebImageCompletionBlock` that contains NSURL* param
- deprecated all MKAnnotationView(WebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created WebCacheDeprecated category on MKAnnotationView (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
Pass image URL in completion blocks - step 3:
- deprecated all UIButton(WebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created WebCacheDeprecated category on UIButton (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
Updated MKAnnotation view category documentation (forth param for the completion block) + alignaments
Documentation alignaments
Updated UIButton category documentation (forth param for the completion block) + alignaments
Pass image URL in completion blocks - step 4:
- deprecated all UIImageView(HighlightedWebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created HighlightedWebCacheDeprecated category on UIImageView (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
Fixed misspell (downloand -> download)
Pass image URL in completion blocks - step 5:
- deprecated all UIImageView(WebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created WebCacheDeprecated category on UIImageView (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
Pass image URL in completion blocks - step 6:
- deprecated block type `SDWebImageCompletedBlock `, replaced with `SDWebImageCompletedBlock ` that contains NSURL* param