Fixing crash on editing notes node

- EditWindow is a popup window, hence it's visual tree doesn't contain
DynamoView class. Thus the Owner is set as null and later OnClick()
crashes while calling ExecuteCommand on owner.
- Fixed by locating the DynamoView object from
Application.Current.MainWindow.
- Fixes http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4174
Do we need to ```FindUpVisualTree```? Can we just use ```Application.Current.MainWindow``` as-is?