Cleanup locking code, add semaphores.
tlp-rdw: lock for 2 seconds after docking events in case dock has multiple devices.
tlp-rdw: fix locking for docking/undocking.