Move opt_default() and set_context_opts() to cmdutils so it can be used from