stubs: add tests and introduce unstub

The new features are `unstub` and `unstub_var` which can be used if you
want to reset a stub before the teardown.

Also an event is introduced to cleanup all stubs, that can be triggered
by `emit test_unstub`.
stubs: allow stubbing non existing variable

The variable stubbing intentionally don't set explicitly which scope to
stub because the stub don't want to affect that when value is restored.

But if there is no variable in the current scope and it is defined, it
will default to local which won't exist outside of the `stub_var`
function. Therefore we default to global when the variable does not
exist.
Merge pull request #7 from terlar/feature/improve-stubs

Improved stubs