[javascript mode] Add call tracking, as used by Tern