feature(typescript_indexer): extend symbol cache to store contexts (#3918)
feature(typescript_indexer): extend symbol cache to store contexts (#3918)

Create a proper caching instance for the TypeScript indexer that caches
VNames for a symbol under a particular TypeScript namespace and symbol
declaration context.

Cache lookups are done by querying a 2-layer map, mapping from a symbol
to a serialized namespace and context to a VName. The namespace and
context must be serialized because object instances are always unique in
JavaScript, and creating a new object for each lookup would render the
cache useless. An alternative to this would be to store an object with
namespace/context tuples:

```typescript
interface { [nsctx: [TSNamespace, Context]]: VName }
```

but TypeScript doesn't support this.

This PR also moves some blocks of code around so they make more sense in
their spatial and contextual locations.
kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe