First draft of typesetting engine

I implemented the Knuth-Plass algorithm. If necessary, I can simplify the code (the current version may work for circle or triangle-shaped text, [see this example](http://www.bramstein.com/projects/typeset/) but we don't need such advanced use).

The PostScript part still needs to be done.
This function is doing a _lot_ of stuff. I could see it being broken into at least 3 or 4 named functions, and since it seems that sharing state across them would be important (e.g. for tallying current width, etc) it might be useful to have a class that represents a single invocation of this algorithm, and to implement these functions as methods on that class. 

You could also use a signal / callback when processing is complete to e.g. have a responder pick up the completed solution and render it to a file. Regardless of how you do it, I think that persistence of the solution should definitely happen outside of this function.