Add py.test support

Run `python setup.py test` to run the test suite, such as it is.
Add test for textools.inline()

To make this regex replacement function testable I had to make the
substitution function a parameter of inline(). Usage is not changed.