dock: fix hide problem.

1. if hide state stucks on showing, dock cannot be shown.
2. if hide state stucks on hidding, dock cannot be hidden.

Change-Id: I56bf222cb0831d198a75d9f8987b5f27d9fcf2ba