Optional SLF4J support without adding compile time dependency

Those changes were originally made by @BrynCooke in https://github.com/orientechnologies/orientdb/pull/1341.
This may have problems in embedded osgi environments.