Avoid possible NPE

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1545388 13f79535-47bb-0310-9956-ffa450edef68
Backport automatic deployment changes part 1
If the resources fail to start, trigger a LifecycleException to align behaviour with Tomcat 8

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1545397 13f79535-47bb-0310-9956-ffa450edef68
Backport automatic deployment changes part 2
Initial test cases

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