Changed rule attachment logic.
	Instead of the horizantal rule following the target via a
	minipage, the needspace package is used.  This frees the
	need to preprocess the target block using the
	sphinxtransformer.  This allows us to rely on Jinja more,
	as intended by nbconvert.

Fixed some macro names to stay PEP8 consistent.
Removed an unnecessary comment.
Unified the output type blocks into the render_output macro.
Updated comments
Centeralized some code into methods
Added more comments
Changed maximum line length from 87 to 85 char.
Fixed string conatation with int value in Jinja.
Fixed single backslash breaking Jinja string output.
Removed unnecessary wrapping by listings package.
Removed indent that showed in verbatim output.