Replace remove() with pop() in semaphore timeout

Summary: dict doesn't support remove(). use pop() instead.

Test Plan: looked at it

Reviewers: jack, tarek

Maniphest Tasks: T15265

Differential Revision: http://phab.wish.com/D21538