Change how the input from rusti is formatted to allow duplicate definitions

Closes #5675.

This changes each recorded declaration/stmt to be in its own block to allow for duplicate names.