Fix pacing of media upload.

There was a lot of hardcoded values used while uploading. Use the values
sent from the server instead. Also need to delay the parsing of the packages
from the switcher as the ACK messages might be delayed too long if we don't.
Also add a small delay in the sending of data so we don't drop packages.
Add support for hashes in media pool