More reliable SMTP collector shutdown

I am trying to shut it down normally first and if it does not work, then gradually increase the aggression until SIGKILL. Also hook it in addfinalizer, which is much more reliable.