Convert to use dicts instead of objects

Change-Id: Id2edef2c14557da797208bfa1068b1f38b2bb89c
Change by_tenant metric

This metric used to also be by cell, but that seems unnecessary, so the
scope has been reduced to just group by tenant.

Change-Id: I91354aafbf3510363cbe5c02e65b87f5f22bcf4b
Cleaned up function to make it more readable

Change-Id: I49a85a9043e607aa668e89104a05a19022372453