Thumbnail Plugin

Update of @gfuchedzhy's [pull request](https://github.com/hyde/hyde/pull/81) to add tests, fix an off-by-one error and add a larger/smaller options. The latter allow you to specify, e.g. the larger dimension and have the smaller one chosen to keep aspect.