Fix issue #1503 with modules and imports sharing a name

Code copied from bug #1503 for convenience. This fixes #1503.
```ts
module Z.M {
    export function bar() {
        console.log(1);
    }
}
module A.M {
    import M = Z.M;
    export function bar() {
        console.log(2);
    }
    M.bar(); // Calls the wrong function at runtime, works if you change the above import to a var
}
```
The issue is that we were not generating a unique name `_M` for the module `A.M`. We need to do this because of the local import `M`, which we were ignoring.