config.py: Adds proxies() function

Since both remotedb.py and tar.py both made use of the same code
that determined available proxies, the code has been moved to a
function in config.py and both files have been changed to make use
of this function.