Improve tracing of sqlalchemy

Use before_cursor_execute and after_cursor_execute instead of
before_execute and after_execute.

1) Migration with custom types will work now (even if tracing is enabled)
2) We don't need to render 2 times SQL expressesion => less overhead

Change-Id: I7c6b6909ce0f15a69ce5caad544e1351a647b472