Update tern - fixes #3606, #3605

Also update acorn, as latest tern needs the latest version of acorn.

Codehinting tests all pass, and performance does not seem to have degraded.