Change do_stop so it won't unlink pid_file if the pid changes midway.

Originally the code would kill pidfiles for standbys being promoted
to active workers in HA scenarios.