Add modifier to symbol that doesn't have a return type

The compiler reports for

    def meth

and

    def meth: Unit

the same tree, especially the `TypeTree` are exactly the same. The only
way to find out if the document contains the return type or not is to do
a lookup to the file.

Fixes #1002221
Wrap refactoring logic in `ask` calls to prevent race conditions