Fix state transition unit tests

This modifies the arming_state_transition api as discussed in pull #1146 to allow for unit tests. Also found the mainStateTransitionTest unit test was broken so I fixed that as well. commander_tests now passes.