make MasterProxy thread-safe

Addresses #459.