Don't create new revisions for every menu tree update in a workspace, and clean up unused revisions.
This takes the work from the patch in comment #3 and adds return types to fix a WSOD issue and removes some debugging code I found in the patch.
Closes #3442963