Improve render_statement; add engine mocking facilities.
Minor clean up according to flake8.
Fix; just catch anything here.
Make render_expression use the stack like mock_engine.
Don't assume stream is seekable.
Make no assumptions about the stream.
Write at once.
Merge pull request #46 from kvesteri/topics/render

Improve render_statement; add engine mocking facilities.