Fix shutdown when run as Windows service

patch by jmckenzie, reviewed by pthompson for CASSANDRA-8136
Merge branch 'cassandra-2.1' into trunk