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
What if we change the layout of the visual tree and the MainWindow is not DynamoView?