Improve how we cluster hive.account_operations
As a quick-and-dirty method, hived makes a call to cluster the table after indexes are built (and only when they are built or rebuilt). But this is inefficient as it means we unnecessarily wait for all indexes to be built before beginning the cluster.
When we build the indexes we launch multiple parallel threads to build indexes for each table by calling "restore_indexes".
I think we should modify restore_indexes to be smarter (and possibly rename it). For any table that is to be clustered, I think it will be more efficient to first build the clustering index, next cluster the table using that index, and finally build other indexes associated with the table.
I guess this may speed up the clustering (since fewer indexes of the table will exist). And it will also for sure allow the clustering to be done in parallel across index/clustering of other tables. In the current case (clustering hive.account_operations), I suspect that alone will save us an hour of time during the final phase before live sync.