netifd: more race condition fixes in proto-shell