Handle graceful shutdown of test suite.
Add optimization flag for Rust compilation.