Wait functions for state

I added waiting functions for state and merged `waitLock` to state.
I intentionally did `State.WaitLock` receive `timeout` always. Because if you want waiting something forever you must suffer and think twice about it.
Also may be makes sense to embed *State to container - this is for discuss.