Link the test suite using -threaded

This allows the test suite to be run using "+RTS -N".

Doing so improves the performance of the test suite on my quad-core Mac laptop as follows:

Before: 8.2 seconds
After:  2.5 seconds
Merge pull request #1796 from bos/threaded

Link the test suite using -threaded