JS Code Hints Crash Preventer

1. Update Tern
2. Implement timeout

cc @dangoor 

Should make timeout a preference.