Refactored Connection.stopped

* Added getter and setter
* Wrapped both getting and setter in mutex Lock/Unlock
removing defer
Merge pull request #2 from jpoz/stoppedRefactor

Refactored Connection.stopped