Small perf improvements from iOS testing

A few performance improvements from profiling on iOS.

The biggest is avoiding some dynamic_casts.  It should be safe with `currentThread` and `threadReadyQueue`, and if not I think we would break horribly anyway already... saves at least a few percentage points.

-[Unknown]