Replace the restore() block with an optional wrapper

Restoring the state without hooking into the test suite was too
unreliable. Instead this option provides a cleaner syntax for setting
variables in a test suites before block.
Bump version to 0.4.0wq