Add jpegoptim interface to optimizeimages

Some measurements on a very very small world:

```
31950856 bytes - no optimisation, imgquality left on default (supposedly 95)
30025305 bytes - jpegoptim()
13091582 bytes - no optimisation, imgquality 80
 9800486 bytes - jpegoptim(quality=80), imgquality left on default (supposedly 95)
```

As a side note, jpegoptim is fairly fast.