Improve TokenUtils performance through caching

For #9717.

### Testing

**Test 1**
Using this file: https://gist.github.com/MarcelGerber/5c11f1031af292044708, place your cursor in the `<script>` tag and press `Ctrl-Space`.

**Test 2**
Using same file, place your cursor in the `<body>` tag and press `Cmd/Ctrl-E`.