Reaction path models of magmatic gas scrubbing