opal2: make opal.deploy.path relative to CATALINA_HOME

If opal.deploy.path is a relative path then according to the
documentation it is meant to be relative to the property catalina.home.
But this was not the case.

This patch checks to see if opal.deploy.path is relative and if it is
then it looks for the directory relative to the path in environment
variable CATALINA_HOME. I would have made this relative to the property
catalina.home except that it's only specified in build.properties which
is not available to the runtime as far as I know.

The patch also makes some minor tweaks like calling mkdirs (instead of
mkdir) and actually checking if it works. It also checks if
opal.deploy.path was actually a directory.
Allow different DataHandler implementation (other than FileDataSource)

This patch attempts to make the writeInputFile method more robust by
adding error checking and allowing for a DataHandler that wraps things
other then FileDataSource (via the DataHandler method writeTo). At the
same time it will still do the efficent file rename for a wrapped
FileDataSource but will use the getFile method of FileDataSource to
access the underlying file instead of getName.