Check that project is accessible and visible before testing nature

This commit switches the order of the tests made to decide if
the nature of a project should be turned on so that the first test
is if the project is accessible. This to avoid sporadic
ResourceException with 'Resource '/xxx' does not exist after projects
have been deleted.
Add missing import of org.eclipse.xtext.ui.editor.templates
Merge branch 'dev' into kepler