Added whenComplete to TextEditor and fixed gotoDeclaration when files are unopened.

Added whenComplete to TextEditor and propagated the Future to down to NavigationManager's use of _selectFile() so that navigation happens after file is finished loading.

Fixes #1910 

Review @devoncarew @ussuri