confd: exit handle signals and exit cleanly

Confd now captures the SIGINT and SIGTERM singals and exits cleanly.