redo window math; add test for basic cases
Merge branch 'features/fastscaling2-dev' of http://github.com/imazen/resizer into features/fastscaling2-dev