To increase performance, the extension reuses a static instance of CIDetector rather than creating a new object for each call to rectWithFace.

From the Apple docs on CIDetector: “This class can maintain many state variables that can impact performance. So for best performance, reuse CIDetector instances instead of creating new ones.”
If the detector does not find any faces, the content mode and scale of the original imageView is left unchanged.
Merge pull request #3 from giffnyc/master

Optimizations - single CIDetector object for the class, and avoiding changes to images that do not have faces in them.