pull calculate_lookup_hash_from_arguments out of _resolve_lock_name

In order to be able to get a lock using the lookup_hash
calculate_lookup_hash_from_arguments and _resolve_lock_name need to be
separated.
pull calculate_lookup_hash_from_arguments out of _lock

In order to be able to get a lock using the lookup_hash
calculate_lookup_hash_from_arguments and _lock need to be separated.
convert several prints to log messages
extract _validate_lookup_hash
separate _unlock into an instance method and a class method

In order to be able to unlock locks acquired with _lock there needs to
be an unlock class method.
allow "non-blocking" _lock
refactor SoftwareResult to enable locking/unlocking with lookup_hash

* allow "non-blocking" _lock
* separate _unlock into an instance method and a class method
* extract _validate_lookup_hash
* convert several prints to log messages
* pull calculate_lookup_hash_from_arguments out of _lock
* pull calculate_lookup_hash_from_arguments out of _resolve_lock_name
rewrite FixOrhpanedAllocationsForDv2Results

This was written before we switched to UUIDs
* Update for UUIDs.
* Trades parsing logs for parsing paths.
* Uses parsed path to acquire lock on SoftwareResult which means it
  should be safer to use.
* Did not reimplement the broken symlinks part.