Use specified cache directory and timeout for the HTTP layer.

Our sworduploader was timing out on large uploads so we wanted to allow the timeout for the connection to the server to be given as a parameter. HttpLib2Layer takes parameters of cache folder and timeout value, but it is then initialised with fixed values of ".cache" and 30.0 rather than using the parameter values given. This change uses the values passed in.