Adapt to CamelStoreSummary API changes.
Avoid camel_store_summary_index().

camel_store_summary_index() is only called when looping over summary
items from 0 to camel_store_summary_count().  But this pattern is not
thread-safe, because another thread could add or remove summary items
while the loop is in progress.

Use camel_store_summary_array() instead to avoid these issues.