fix crash in getCompletionEntryDetails

`getNarrowedTypeOfSymbol` assumes that `node` should always have a parent. However often in semi-completed code `node` is SourceFile for which `parent` is `undefined`. This fixes #1286
Original crash happens as a result of interaction between calls to `getCompletionEntry` and `getCompletionEntryDetails` and I'm not sure that it can be reproduced in fourslash.