TBR: Use unique keys and not project names to determine equality.

Jiri used to assume that project names were unique.  Once we implement
importing remote manifests, that assumption becomes hard to enforce.

This CL adds a Key() method to projects which returns a new ProjectKey
type.  The key is currently a combination of the project's name and
remote, although this is easy to change in the future.

The Projects map is now a map[ProjectKey]Project.

There is still a lot of code that tries to lookup projects by their
name.  For instance:
* tools and hooks in the manifest both refer to their projects by name
* some command-line tools take a list of project names as arguments

To support these cases, I added two methods to Projects map:
* FindName, which returns all projects matching the name, and
* FindUnique, which returns a single project matching the name, or
  an error if none or many are found.

NOTE: This is *almost* the same CL as
https://vanadium-review.googlesource.com/#/c/18205/.  The only
difference is that we now call writeMetadata() inside
nullOperation.Run().  We need to do this to make sure the remotes in the
metadata file are always in sync with the remotes in the manifest,
otherwise the project keys will differ.

MultiPart: 1/2
Change-Id: I334ffed799e8900b01865da2211b2de4cd04e9bf
8 files changed