Previously we assumed rethrow's argument was always 0, but it turned
out rethrow follows the same rule with br or delegate:
https://github.com/WebAssembly/exception-handling/pull/137
https://github.com/WebAssembly/exception-handling/issues/146#issuecomment-777349038
Currently rethrows generated by our backend always rethrow the
exception caught by the innermost enclosing catch, so this adds a
function to compute that and replaces rethrow's argument with its
computed result.