Add support for stand-alone, pre-resize, and post-resize extraction

I implemented the API (with unit tests) as described in #23 (https://github.com/lovell/sharp/issues/23#issuecomment-53325646). The `extract` method can be called stand alone or it can be called before and after calling resize. I know that issue is tagged as "work-in-progress" but I didn't see a branch for it and I needed it. My C++ is out of practice at best but I tried to just follow the existing patterns. I don't mind making tweaks or changes if I can make it better.