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.
I know this seems like a minor thing, but could you use 4-space indents instead of 1-tab indents? It's recommended by PEP8, and makes the code read better across all devices.  PEP8 also asks that lines stay in an 80-column limit, which will be especially important if this code will be printed in the book.