Improve the re-usability of the addQueryArg() function

- Support SSL protocol
- Make the serverUrl code re-usable
Fix issues with dirname() on Windows
Whitespace
Code style
Small fixes
Missed one else
Slight simplification
Merge branch 'master' of github.com:YahnisElsts/wp-update-server into Reusable-server-url

Conflicts:
	includes/Wpup/UpdateServer.php
Merge branch 'master' of github.com:YahnisElsts/wp-update-server into Reusable-server-url
Minor changes / code style, method naming
Merge pull request #14 from jrfnl/Reusable-server-url

Refactor server URL detection as a separate static method