ctld: Write the pidfile once after forking
Don't rewrite the pidfile each time main_loop is called.
PR: 284282
Reported by: asomers
Reviewed by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D48768