Implement NotifySemaphore

NotifySemaphore provides a dead simple interface for the common scenario
where a consumers gets notified by the database when new work is
available.