wt-status: make the require_clean_work_tree() function reusable