Multiplatform serverstop

A pull request which adds a multiplatform way of stopping the server as discussed in #101.

@bcipolli does it work for you?