Optional SLF4J support without adding compile time dependency

Those changes were originally made by @BrynCooke in https://github.com/orientechnologies/orientdb/pull/1341.