Fix the slow retrieval attack issue and implement the safe and unsafe modes.

download.py:Add a timeout and rewrite the _fileobject.read(). safe download and unsafe download

test_slow_retrieval_attack.py:Add a new kind of slow retrieval attack

slow_retrieval_server.py:Modification for new kind of slow retrieval attack

test_download: Add tests for unsafe download.

test_updater: Modification for safe_update_metadata and unsafe_update_metadata

updater.py: Refactor the update_metadata function and split it into safe and unsafe parts.