port fix from Akka for HashedWheelTimer

Ported from commits:

* https://github.com/akka/akka/commit/cb4e3536b0ed3483bd3636d7789c0ddcadafa2da
* https://github.com/akka/akka/commit/7e590f3071bdf89a4aa9d7d262bac8923d85e754


As per #744 and #1126