deployment timeout fix

Solves #2811,  #3094 and  #3023.

This patch differentiates the timeout period for the deployment depending on the request type. For the upload of the files the timeout considers not only the time required to send the files but also the time required for the device to process those files and send back the OK.