refactor download_status code into its own file
directory.c is very large and difficult to navigate. Many of the functions related to manipulating a download_status_t look like they can be in a separate file. It might be a good idea to finish #23354 (moved) first.