Naive implementation of 2 Phase Commit in Erlang