Fixed incompatibility issues with Mercurial

Mecurial's module "`demandimport`" delays imports form like "`import a, b.c`", cause Pyflakes was unable to distinguish Python 2 or 3. This patch changes the imports to immediate form "`__import__('a')`" to avoid this mechanism.

The bug can be 	reappeared with Hghooks 0.5.5 (https://pypi.python.org/pypi/hghooks/). With the hook `pretxncommit.pyflakes = python:hghooks.code.pyflakeshook` enabled, trying to commit this `.py` file will fail:

``` python
# -*- coding: utf-8 -*-

class Foo(object)
    bar = 1
```