introduce SessionMiddleWare to control session handling via an annotatio...

...n

refs https://github.com/owncloud/core/issues/11566

@LukasReschke @Raydiation THX
we should probably use ->query() here since its on the interface