new mongo stop method

Here's a new way to stop the mongo database, works on Windows as well as Mac OS/zsh. As I could not figure out to run your tests, please verify your own cases carefully :) I'm also a PR newbie so I hope this is the way to do it. Thanks!