Make RefCell::unwrap safe

The function must only be able to return the result when there are no borrows
left – this means that the `debug_assert!` must actually be an `assert!` to be
safe.