Backport of r1557082
Better align 7.0.x with trunk to aid back-ports

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1596356 13f79535-47bb-0310-9956-ffa450edef68
Backport of r1575545
Better align 7.0.x with trunk to aid back-ports

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1596359 13f79535-47bb-0310-9956-ffa450edef68
Backport of r1575885
Better align 7.0.x with trunk to aid back-ports

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1596360 13f79535-47bb-0310-9956-ffa450edef68
Backport of r1575910
Better align 7.0.x with trunk to aid back-ports

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1596362 13f79535-47bb-0310-9956-ffa450edef68
Partila back-port of r1667092
Avoid possible NPE

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