Clear the localThread when the index is refreshed

Clean up the local thread after each sites when doing a complete
reindexation or a complete refresh.
This cleanup should be in the larger tasks, not the smaller ones