Make the number of threads available for a Task customizable

Also gives search tasks 2 threads by default.

Change-Id: I7e1d4db559f39faa92641068e7ac433675dd5ef5