Added support for selecting the number of threads used in bitwise.dist and mlg.filter

Users can now run these functions serially by passing a 1 value for the threads argument.
A value of 0, now the default, should run just as it did before this commit.
All other non-negative integer values should work as well, but may not run as well as either 0 or 1.