Fix after_commit for Active Record 3

Calling after_commit with an array as the value for :on causes a crash in AR/Rails 3.

See: https://github.com/rails/rails/blob/f7c2a8114136dd872e9d81aa16e93b9b9a148b0b/activerecord/lib/active_record/transactions.rb#L226-233

This splits the :create and :update into separate after_commit calls to work around this. There may be a more elegant way to do it...