Switches, latches, and amplifiers: common themes of G proteins and molecular motors