Update updater.py to also check for compressed versions of targets.txt

Also added a comment to make it obvious that referenced_metadata should always be release for delegated roles.
Fix bugs with a library and a few unit tests.

Include a missing import for a library so that it does not throw a
runtime error.

Include missing imports for unit tests so that they are standalone.
Merge remote-tracking branch 'origin/master'
Merge branch 'master' into path_hash_prefix
Accommodate including compressed versions of release in timestamp.