MDL-31501 rework user session architecture

List of changes:
 * New OOP API using PHP namespace \core\session\.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used for one access only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Other minor bugfixing and improvements.

Limitations:
 * Session access time is now updated right after session start.
 * First request does not update userid in session table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There can not be any hooks triggered at the session write time.

TODOs:
 * Peer review.
 * Get agreement about the new direction.
 * Test, test, test, test...
 * Move deprecated functions to lib/deprecatedlib.php and update usage in the whole codebase.
 * More docs for admins.