Refactored Connection.stopped

* Added getter and setter
* Wrapped both getting and setter in mutex Lock/Unlock