Remove duplication from adding transition logic

Removes the duplication in statesman/machine.rb.

@isaacseymour @mrappleton what do you think?