Fix main function detector

When learning about Kotlin and the code base, I stumbled upon a small TODO in `JetMainDetector` which seemed to be easy enough to fix and have a visible effect (if the type of the single parameter of the `main` function was declared like `jet.Array<jet.String>` instead of `Array<String>`, things wouldn't work). So I decided to try to fix it...

... and it of course wasn't that easy. The main obstacle was getting the scoping information right for type resolution, but I finally figured it out. So here's the patch. I don't know if I'm supposed to sign some form of contributor license agreement, so if that's the case, please let me know. Also, if the patch looks wrong to you (maybe there should be a test?), I'd be happy to iterate on it with some guidance.

Thanks.