std: replace finally with scope.

This adds a `scope!` macro similar to D's scope statement. It runs a
user specified piece of code in the destructor of a stack variable to
allow guaranteeing that it runs, even on failure.