The statefile-not-set case was not tested. Previously the code will make
ui._progbar return None, which means no progress bar.
Also move the docstring to the header so it shows up in hg help -e, and
use modern config registrar to avoid devel warnings.