Tomcat multi-instance support based on CATALINA_BASE

This patch would allow Tomcat multi-instance configuration based on CATALINA_BASE instead of CATALINA_HOME as described in the Tomcat documentation, along with some code refining.

It would supersedes the pull request #227 and more.

This pull request is for public reviewing and I am still working on testing the patch.
I will re-submit another pull request for merge after gathering comments and the overall tests is finished. (so please do not merge yet)