It would be nice to support nested transactions within commit_on_success
Great catch, I'm actually surprised this hasn't come up before!
 This has been fixed.  See testcase: 54b655c8469fd0f22608ac55f681d99ffab72316
 Reopening.
 I didn't like my implementation and have re-written it.  New code is in 727299c323f97fb3a5c82c2ca88b1a0adb9ad06f and tests in 318ff7b3ca9689a537999cb923845d6d54014514
 Seems very nice. Thank you!

Sometimes we have an operation that uses itself the `commit_on_success` decorator but it needs to call another operation using `commit_on_success`. The current version just commits the inner part regardless the erros that may occur in the outer part.

I've solved this problem as bellow, but maybe it worth to have it integrated on peewee. (And maybe better designed)

```
class CustomMySQLDatabase(peewee.MySQLDatabase):
      def commit_on_success(self, func):
          def inner(*args, **kwargs):
              orig = self.get_autocommit()
              if self.autocommit and not orig:
                  # Consideramos aqui que estamos ja dentro de uma transacao
                  return func(*args, **kwargs)
              else:
                  self.set_autocommit(False)
                  self.begin()
                  try:
                      res = func(*args, **kwargs)
                      self.commit()
                  except:
                      self.rollback()
                      raise
                  else:
                      return res
                  finally:
                      self.set_autocommit(orig)
          return inner
```
