Thumbnail feature

Closes #1491

I ended up making two plugins:

A task plugin 'scale_images' that creates thumbnails for images in directories specified by new IMAGE_FOLDERS option, just as galleries plugin does, and placing them in output directory with same path mapping as copy_files does (with .thumbnail added to thumbnail filenames).

And a reST plugin 'thumbnail' that works like image or figure directives (depending on whether there is a body or not) that uses the thumbnail and links to the full size image. It is the responsibility of the user to ensure that the path of the image file matches the path in the directive, just as is already the case for the existing method (image/figure directory + copy_files plugin).

I moved the image resizing routine from Galleries to a new ImageProcessor class so I could reuse it. I haven't touched the docs yet, since I'd like to get some feedback first.