Currently, callers of safe_glob() set an empty glob_t or glob_t with opendir func, and all other components are always zero. So, let's introduce safe_glob_full() which optionally takes opendir function, rather than glob_t, and returns result strv, rather than storing results in glob_t. Also, introduce safe_glob() which is a trivial wrapper of safe_glob_full() without opendir func. No functional change, just refactoring.