Fix for bug1962. Protect subscription request from asynchronous access a...

...nd messed up state by expiring subscriptions - use semaphore to lock access