Rewrite resize function. Fixes #1

The resize function is now extended so it supports more functionality. Parameter passing with arrays has been removed.

New functionality included:
- Resizing of a single image side
- Preserve image ratio when both width and height have been set (treated as maximum values)
- Prevent image from being upsized

Signed-off-by: Dries Vints <dries.vints@gmail.com>
Fix old unit tests

Signed-off-by: Dries Vints <dries.vints@gmail.com>
New unit tests for new resize function

Signed-off-by: Dries Vints <dries.vints@gmail.com>
Merge pull request #2 from driesvints/dv/extend-resize-function

Extend resize function. Fixes #1
added more tests for new resize method
updated readme on new resize method
added legacy resizing method
psr fixes