Detect JRE location using registry; other fixes

A default install of the Oracle JRE will not set PATH or JAVA_HOME. This change scans the registry for JRE installs to determine the correct one to use, meaning there is no longer a requirement for the Brooklyn user to manually set either JAVA_HOME or PATH to be able to run brooklyn.