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.
You are right. By this I tried to fix race between two RUN commands in buildfile, because they share same runconfig. So image id can change before we call `ToDisk`. But it seems that it must be fixed in buildfile.