Problem: Cannot tell whether a register is being used for executing or
recording.
Solution: Add reg_executing() and reg_recording(). (Hirohito Higashi,
closes#2745) Rename the global variables for consistency. Store
the register name in reg_executing.