added locks to make AddDAG::getCtxt thread safe
added locks to make AddDAG::getCtxt thread safe

berserkr/HElib,shaih/HElib,AlexanderViand/HElib,AlexanderViand/HElib,shaih/HElib,berserkr/HElib,berserkr/HElib,shaih/HElib,AlexanderViand/HElib