Declare test-time dependencies on six and mock.
Allow passing additional settings for new documents.
Added line-classes support to literalinclude.
Remove code duplicated between code and literalinclude directives.