Ability to check if we're in recovery or not

For use by advanced services that mess with command
execution and state.