syslogd: Add closelogfiles() function
The closelogfiles() function completely disassembles the global filed
list by freeing all filed components and removing them from the list.
Reviewed by: markj
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41388