Add optional lower and upper bounds to the media regenerate subcommand

Sometimes when you generate 97k thumbnails, and your process dies after 5 hours, you want to resume it from where it left off.

Since the generation starts with the latest posts, the highest id go first. So:

* `[--start=<start>]` defines the upper bound. All posts with ids higher than this ID will be ignored.
* `[--end=<end>]` defines the lower bound. All posts with ids lower than this ID will be ignored.