Core: Allow to configure custom thread pools