more unittests and updated documentation for extensions.  Fixed bug in optimizer that caused blocks to be optimized away under some circumstances.

--HG--
branch : trunk
diff --git a/jinja2/nodes.py b/jinja2/nodes.py
index ad39903..12fdc34 100644
--- a/jinja2/nodes.py
+++ b/jinja2/nodes.py
@@ -767,7 +767,7 @@
     This node is usually constructed by calling the
     :meth:`~jinja2.ext.Extension.attr` method on an extension.
     """
-    fields = ('identifier', 'attr')
+    fields = ('identifier', 'name')
 
 
 class ImportedName(Expr):
@@ -801,6 +801,10 @@
         return Markup(self.expr.as_const())
 
 
+class ContextReference(Expr):
+    """Returns the current template context."""
+
+
 class Continue(Stmt):
     """Continue a loop."""