Use Namespace as a key into Site.namespaces

Existing code uses a namespace variable, consisting of an int, as
a key into the Site.namespaces dict.  In order to change these
namespace variables to be a Namespace object instead of an int,
the Namespace object needs to be usable as a key.

Change-Id: Ib30da3c1e8fb0fef2e5efd8d06313f8852802934
Merge "Use Namespace as a key into Site.namespaces"