add missing locks to legion_cache_fetch plugin

I'm not 100% sure they are needed, can something (legion thread?) modify those struct lists while we are iterating or modifying it inside plugin master_cycle() call? If so please merge.