Terminate the app deployment watching thread when we stop the
application server, as otherwise we will try and use a watch-service
that has now been closed.