fixes for build timeout environment variable feature

fixed the following
1. added the new tests to verify the timeout env variable.
2. keep the previous constructor to preserve backwards compatability.
3. revert existing tests to use the previous constructor.