Added a test that checks that the concurrency mechanisms are not generated when they should not
Changed the IR construction of a class to not add the thread declaration to the class if generation of the concurrency mechanisms is disabled