Remove variables defined in `match?` from scope

At @josevalim's suggestion, we loop over the ast given to the macro and
disable scope of any new variables defined, which effectively stops
variables from leaking into the outside scope.

Fixes #1304