Add checks if the underlying project closed/not exists

There are scenarios, where project depends on other, closed projects -
this happens with IvyDE, which adds even closed projects to the dependency
list (of course, in that case, the generated jars added as well), but
these closed projects cause build failures for ScalaIDE, because it
doesn't expects that the underlying IJavaProject could throw exceptions.
So the general fix is to add checks before calling the critical methods,
and a catch block with logging.
 This fixes #1001465
Merge pull request #298 from gzsombor/handle-exceptions-with-closed-projects-for-3.0.x

Add checks if the underlying project closed/not exists