Refactor TR `define` to avoid a performance bug

After commit 3d177e454ea3634060a4b9b0814f588bc7c74e49
running the main `math.scrbl` file would show peak memory
usage of around 600-700MB when before it was around 400MB.

The proximal cause appears to be the expansion of TR
definitions, which added an extra `begin` in some cases,
combined with redefinitions at the top-level. I don't
know the core cause yet.

Thanks to Matthew for pointing out the issue and to
Vincent for helping with debugging.