Add support for running tests on different threads

Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Add threaded option to test.

Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
test.c: use same numbering in threads as in procs

Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Set flags for tests that can run threaded.

Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>