Add finally(), associated documentation and tests.