[core] Protect session data from unwanted loading.
Use specialised Session and Connection types that forward their 'data' and
'session_data' attributes to the pyramid request.session attribute.
This forwarding is done with properties, instead of copying a reference, which
allow to access request.session (and the session factory) if and only if
Session.data or Connection.session_data is accessed.
In some cases, most notably the static resources requests, it can mean no
access the session during the request handling, which saves a request to the
session persistence layer.
Closes #4891437
[pyramid\_cubicweb][] is one specific way of integrating [CubicWeb][] with a
[Pyramid][] web application.
### Features
* provides a default route that let a cubicweb instance handle the request.
### Usage
To use, install pyramid\_cubicweb in your python environment,
and then [include][] the package:
config.include('pyramid_cubicweb')
### Configuration
Requires the following [INI setting / environment variable][]:
* `cubicweb.instance` / `CUBICWEB_INSTANCE`
[pyramid\_cubicweb]: https://www.cubicweb.org/project/pyramid-cubicweb
[CubicWeb]: http://www.cubicweb.com/
[Pyramid]: http://pypi.python.org/pypi/pyramid
[include]: http://docs.pylonsproject.org/projects/pyramid/en/latest/api/config.html#pyramid.config.Configurator.include
[INI setting / environment variable]: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html#adding-a-custom-setting