Hygiene: Use commit metadata in one-off indexes

Since we added the commit metadata, including the topic workflow, passed
on into the listeners we no longer need to do as much work to determine
the extra rows these indexes add.

The patch utilizes the 'workflow' parameter of the commit metadata where it
can to avoid doing more complex lookups. Due to the recent addition of
Index::cachePurge() commit metadata is not always available and we cannot
kill the old code.

Change-Id: Ic1485c784bab24ea23e53535e2f465ae5f2a934d
Merge "Hygiene: Use commit metadata in one-off indexes"