Fix calculation of nthreads during constraint application
In !523 (merged), the calculation of number of threads was changed to "min(n_threads, 1)
", making it always use 1. Reinout reported this slows down TEC+phase fitting solves by a factor of 5. It will also have an effect on solves that apply smoothing.