Microsoft/TypeScript — pull request #473 by mhegazy (2014-08-18 20:31:02+00:00)
Title: Wire getReferences to use the new compiler

A few notes:
* The new implementation include values with a contextual type we are searching for e.g.
```TypeScript
interface IFoo {
member: number;
}

var x : IFoo;

x = {member: 1};
x = {member: 2}; // search for member should get you IFoo.member, member:1, and mebmer:2
```
* The new implementation should handle string and number named declaration properly, which we did not handle before. e.g.
```TypeScript
var x = { "foo" : 0 };
x["foo"] = 1;
x.foo = 2; // should see all instances of "foo"
```
* Another difference is now we have one symbol for all merged symbols, to overcome this, we identify a "meaning" for each location; the "meaning" is a syntactic classification of the location as namespace, value or type access. we now include references that intersect with the original search location. some special handling is needed for constructs that straddle multiple spaces like classes and enums.

* getScope is meant as an optimization to limit the search scope if possible (e.g. local variables and parameters), i will add this later