Making two dictionary writes atomic in multithreaded context - C#