BUG-1786: fixup DeadlockDetectingListeningExecutorService
This patch deprecates the use of a Function where a Supplier should be
used.
Furthermore it shifts the balance of the ThreadLocal interaction by
retaining switching a Boolean to a SettableBoolean and flipping the
field contained within it rather than setting/removing the thread local
value itself. This can leave a single object attached to a thread --
which can be removed by a call to cleanStateForCurrentThread(), but
improves the performance of the fast path by utilizing the
ThreadLocal.get() fastpath when used with threadpools.
Change-Id: I2d8897138f8719187425e3aa8121bdc0f1ff39b2
Signed-off-by: Robert Varga <rovarga@cisco.com>