Resize user images on upload

If profile images are larger than 240px in one of the dimensions, resize them. Keeps the aspect ratio and should work with PIL and Pillow.