text/template: add back pointer to Nodes for better error generation
ErrorContext now has all the information it needs from the Node,
rather than depending on the template that contains it. This makes
it easier for html/template to generate correct locations in its
error messages.

Updated html/template to use this ability where it is easy, which is
not everywhere, but more work can probably push it through.

Fixes #8577.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/130620043
diff --git a/src/pkg/text/template/parse/parse_test.go b/src/pkg/text/template/parse/parse_test.go
index ba1a18e..fa6790b 100644
--- a/src/pkg/text/template/parse/parse_test.go
+++ b/src/pkg/text/template/parse/parse_test.go
@@ -77,6 +77,7 @@
 		// because imaginary comes out as a number.
 		var c complex128
 		typ := itemNumber
+		var tree *Tree
 		if test.text[0] == '\'' {
 			typ = itemCharConstant
 		} else {
@@ -85,7 +86,7 @@
 				typ = itemComplex
 			}
 		}
-		n, err := newNumber(0, test.text, typ)
+		n, err := tree.newNumber(0, test.text, typ)
 		ok := test.isInt || test.isUint || test.isFloat || test.isComplex
 		if ok && err != nil {
 			t.Errorf("unexpected error for %q: %s", test.text, err)