Improve handling of errors during creation of new sessions

Use trigger_error to detect setup problems, instead of spinning forever.
Also improved detection of the relatively more possible duplicate primary
key error.
Document local/remote root paths and static files

Add much-needed central documentation for local ([DESIGN_5010 Local root
path]) and remote ([DESIGN_5011 Remote root path]) root paths and their
configuration.

Add formal definition of (and central documentation for) static
files ([DESIGN_5015 Static files]) and document how they work; also
consolidate and the way they’re generated into
QlXhtmlResponseEntity::make_static_url() (provisional name and class), and
make that conformant with the documentation.