Catch MongoCursorExceptions and retry insert/update on 'not master' errors