improve error handling; primitive logging

- fix a case of error handling in tern.js (used to cause time-outs)
- fix request error handling in tern.vim (default urllib2 handlers raise HTTP 400 as error)
- add primitive request/response logging option in vim plugin (via :messages)