Stop was async

fixes #312 

Also removed duplicated code in mininode/miniclusternode from our source base