added jsonpatch to mongo
merged from msater
Added unsafe update part
Added enhanced connection management and unsafe update