Fix a crash when renaming a variable (in executeRenameAction)
When renaming a variable, the function BasicRefactoring::executeRenameAction
calls the isValid
method of IndexedDeclaration
which is documented to
require the DUChain to be read locked. However the function does no such
locking. This commit introduces a lock around the two calls.