This patch lifts RootID out of the RewriteRule class so that constructs
(e.g. inline functions) can that refer to the root id don't need to depend on
the RewriteRule class.
With this dependency, the patch is able to collect all ASTEdit helper function
declarations together with the class declaration, before the introduction of the
RewriteRule class. In the process, we also adjust some of the comments.
This patch is essentially a NFC.