Fixes #973

Since logback is a weak dependency, i.e. it may or may not be present at
runtime there cannot be an import referring to it. Instead a
LogbackWeakDependency class is introduced which contains reflection code
to try to load it, with a fallback if not present.