Record operations only for signalling sessions (reprise)

This is a rebase of commit cf40cae (GitHub pull request #109 by @paxan)
on current master. The original changes were (I assume accidentally)
undone in commit eb208b5 (GitHub pull request #123 by @thrisp). The
original commit message is copied below.

In some scenarios model classes derived from SQLAlchemy(...).Model
may be used with basic SQLAlchemy session instances which aren't
extended with signalling functionality.

Before this fix, when you try using a vanilla session with
such models, you would get exception like this:

  File ".../flask_sqlalchemy.py", line 163, in after_insert
    return self._record(mapper, instance, 'insert')
  File ".../flask_sqlalchemy.py", line 172, in _record
    s._model_changes[pk] = (model, operation)
AttributeError: 'SessionMaker' object has no attribute '_model_changes'

With this fix, this problem is resolved.
merge