config: handle empty backends when iterating
config: deduplicate iterator creation

When the glob iterator is passed NULL regexp, call the non-globbing
iterator so we don't have to special-case which functions to call.