Make timer/profiler be thread-safe

* Use SIGEV_THREAD exclusively, don't use signals.
* Remove the emergency timeout feature -- inherently bad idea, never has
  been used at WMF, can't be used with HHVM, doesn't work with
  SIGEV_THREAD
* Share code related to SIGEV_THREAD between timer and profiler use
  cases -- previously it was only in the profiler.
* Improve handling of errors from timer_create() and the cbdata
  allocator
* Add a leak warning to RSHUTDOWN.
* Call timer_delete() after the semaphore is acquired, in case the timer
  event handler reschedules the timer due to a pause delta.
* Merge luasandbox_timer_callback_data with luasandbox_timer -- the
  distinction doesn't seem to make sense anymore. Not sure if it ever
  did.

Bug: 70177
Change-Id: I5e1f4fd2f861d53b9774c7cd4f045db7a637af50