Mixed in the files from my testability experiment

This is code based on the module from my testable modules article for JCM. I've got a complete set of tests for it back in the original repo I pulled this out of, but they're not hooked up to any testing setup here.

I wanted to put these out here as an indication of the direction I think we need to be going with all the extensions -- fully testable without requiring pieces of Joomla to be loaded. It makes for cleaner code, more loosely coupled and easier to modify. It's the way the entire project has to start heading; rather than just talk about it, I wanted to start putting some concrete examples of it out here to look at and work with.