Backport extensible session id generator from trunk/tc8.
Not contained is the change to the manager interface and
the corresponding method deprecations.

Backport of r1619056, r1619106, r1619114, r1619361,
r1619362, r1619583, r1631628, r1631852, r1632411.

Original log messages:

Make session id generation extensible.

See discussion "Special requirements on session id generator"
on dev list (http://marc.info/?t=139238389300003&r=1&w=2).

1) New interface org.apache.catalina.SessionIdGenerator
   - setter and getter for jvmRoute
   - setter and getter for session id length
   - generateSessionId() (use jvmRoute if set) and
     generateSessionId(String route).
2) Renamed org.apache.catalina.util.SessionIdGenerator to
   abstract org.apache.catalina.util.SessionIdGeneratorBase.
   For consistency with similar cases.
3) Adjust visibility of getRandomBytes(byte bytes[]) in SessionIdGeneratorBase
   from private to protected to allow extension.
4) Moved generateSessionId() from SessionIdGeneratorBase
   to new org.apache.catalina.util.StandardSessionIdGenerator
   extending SessionIdGeneratorBase and implementing SessionIdGenerator.
   Make SessionIdGeneratorBase abstract.
5) Changed message keys in org.apache.catalina.util.LocalStrings.properties
   etc. from sessionIdGenerator.* to sessionIdGeneratorBase.*.
6) Add getter and setter for SessionIdGenerator to Manager interface
   and to ManagerBase. Deprecated setSessionIdLength(int) and
   getSessionIdLength() there. Use value only if explicitly set
   otherwise use value from SessionIdGenerator impl.
7) Adjust SessionIdGenerator initialization in ManagerBase:
   uses generator set in context config if present, otherwise
   uses StandardSessionIdGenerator as default.
9) Add Context/Manager/SessionIdGenerator to digester ContextRuleSet.

Method getSessionIdLength() and setSessionIdlength(int) in Manager
interface only kept for API stability (too late for removing in TC 8).

Add support for the SessionIdGenerator to cluster manager template.

Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57089
Ensure that configuration of a session ID generator is not lost
when a web application is reloaded.


git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1642482 13f79535-47bb-0310-9956-ffa450edef68