Update tern and acorn

Fixes a number of codehinting issues:
issue #3917
issue #3883
issue #3837
issue #3830
issue #3786

This doesn't update to the very latest tern, as there is a bug with the latest tern and minified angular.js files.  This does fix a number of issues though so I wanted to get those fixes in