Allow overriding nflow thread factory. Create also dispatcher thread using the thread factory