update to latest tern (in sourcegraph branch)