SI-7280 Scope completion not returning members provided by imports

Scope completion was not returning members provided by import declared in the same block as the given position, if the position was inside an expression which could not be typed successfully, or outside any expression (2 normal use cases when triggering completion in an IDE).

The first commit is a port of retronym/scala@e7ebf3825b4bc63e60ea1e7fcb8c74d509f5a0c6 on the 2.11 code base, to add support to test scope completion in parttest. The second one contains some basic tests for code completion (inheritance, multilevel definition, ...). And the last commit contains the actual fix, with the associated test.

review by @retronym, @odersky