Use a concurrent map for sourceFiles.

* removed some `synchronized` blocks that shouldn't be necessary now
* remove tricky "compilationUnits" method.

Fixed #1001859