Optional SLF4J support without adding compile time dependency #1341

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