Fix any types and extract method (#158967)
Fix any types and extract method (#158967)

`currentCell` and `notebookUri` are currently any types, which hides type errors. To fix this and clean up the code, I've extracted a new `getCellFromCellDocument` method
microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode