CB-5422: Don't require JAVA_HOME to be defined

JAVA_HOME is not necessarily defined on Linux and Mac.
Print out the value of JAVA_HOME in the error message
in case "java -version" fails.
Moving the console.log out of run() method

Since cordova-cli calls the check_req library run() method, we do not
want to always console.log on success in there (not usually a useful side
effect).