cmdutils: add support for caller-provided option context.