Make some methods non-inline, and hide #include <tools/debug.hxx>.

This header is also included all over sc.

Change-Id: I4b8092c83a40bdeefd0781046125746ca8d35c9a