IndexManager: do not build Indices while holding the lock

Nobody likes contention points! Pay the cost in locking complexity so that
the only work we do while holding the lock is when we actually look at
and manipulate the col_indices map.

Signed-off-by: Greg Farnum <greg@inktank.com>
IndexManager: do fewer lookups in get_index()

Use an iterator so we only need to go through the map once, and use
it for a faster insertion.

Signed-off-by: Greg Farnum <greg@inktank.com>