Move version gathering into function and test it
Set timeout for version check requests

Ported from setup script code (setup/lib/index.lib.php).
Use single code for fetching sremote version information
Move version parsing to Util class
Improve version parsing to cope with version numbers we use currently