Move the command name recording action up to next to the command name.

This makes it so that ragel can share states for mailbox and related
expressions, which reduces the size of the state machine by about 90%.