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

Now rebased onto the alpha branch... I implemented the API (with unit tests) as described in #23 (#23 (comment)). 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.