Fixes service debugging (no longer injected into output)

Fixes #83.

Includes:

* New tests in `setup-test.php` (to be moved to PHPUnit for v1.2)
* Fixes to `service.php` to use centralized trace functions
* Minor cleanup and whitespace mojo

@ngallagher87 For review and merging when you're ready.