[SPARK-2318] When exiting on a signal, print the signal name first.

Could you indulge me by wrapping this in a "synchronized"? Also, that if seems a bit too important / unexpected to keep hidden on the same line, so this will help that too.