This adds the `USES_TERMINAL` flag to the test runner custom target.
A `RUN_SERIAL` flag is added to enable this behavior only when desired.
This adds about 20% to the leveldb tests duration on my machine, but
since they are only running as part of the check-all (or higher) global
target the impact is minor.
This is expected to prevent spurious leveldb failures like
https://build.bitcoinabc.org/viewLog.html?tab=buildLog&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterCoverage&buildId=87936&guest=1