Switch from using Log4j to using SLF4J.

This enables users of the API to pick their logging implementation
themselves.