Add function retry_wrapper to handle reexecuting failed greenlets.

Summary:
Previously we were wrapping all functions spawned as greenlets with
log_uncaught_errors(); now we instead wrap with retry_wrapper(), which handles
both logging uncaught exceptions and retrying on failure.

retry_wrapper keeps a failure count. By default, it will stop retrying if there
are too many failures in quick succession, but will reset the failure count to
zero if there are no failures over a longer interval (default five minutes).
This behavior is designed to be configurable.

Test Plan: Unit tests added.

Reviewers: mg, kav-ya

Reviewed By: mg

Differential Revision: https://review.inboxapp.com/D178