Add an attribute to SCMTool for specifying the unique SCMTool ID.

Review Request #10799 — Created Nov. 18, 2019 and submitted — Latest diff uploaded

Review Board

SCMTools are a very old part of Review Board, and existed long before
any modern registry mechanisms were put in place. We've used an
in-database representation, the Tool model, to manage the
registration. In some cases, we used its primary key to uniquely
identify the particular SCMTool within the system. In others, we used
the attribute instead (in the API, for instance).

We've long known that we've wanted to replace the existing system with a
modern registry. While this change does not do that, this takes a baby
step by adding a SCMTool.scmtool_id attribute, which defines a unique
ID for the tool. If not populated, it will default to the key in the
EntryPoint that registered the tool.

This will allow us to more easily make references to the tool in places
like mapping dictionaries, and to start writing more future-proof code
that centers more around the SCMTool than the Tool. An upcoming
change will begin moving RepositoryForm over to this, as a precursor
to some larger-scale work that's needed.

Unit tests pass.

Tested along with upcoming changes to RepositoryForm.