Use unordered_map for storing locks

The locks are never iterated over, so unordered_map will end up being more efficient.