fix gradle-wrapper ignoring -g / --gradle-user-home switches

Hi. My first attempt to fix an issue I mentioned in the forums. The change adds the -g / --gradle-user-home options to the parser and uses that in the home-searching method if specified on the command line.
I inlined some code out of a helper method directly to main as this method would have to return 2 things (the home and properties, or ParsedCommandLine and properties) or I would have to create a parser and parse twice. Of course, there might be a better way still.
I also optimize a tiny little bit in that I call the home-searching method only once.

wujek