Add support for picking a different short option if the first
letter has been previously used.

This idea was supplied by @iw-kuchun (Boris Kuchin), who supplied
a working diff that I missed due to github inactivity. His unit
tests are used in this commit.

I used a coroutine for the short option generator. I have been
studying these recently and fear I may be suffering from hammer/nail
syndrome. However, the code looks very readable, so I left it in.