Expose “open” and “transaction” flags in BaseSession.

You still need to cast down to BaseSession to see them, so they are not
part of the official API, but can be used for integrating other session
management features.

Fixes issue #713.
Merge pull request #873 from slick/tmp/issue-713

Expose “open” and “transaction” flags in BaseSession.