veyron/services/store/viewer: Fix context bug with template rendering.

In a previous CL I eliminated the TODOContext by wiring contexts
through properly everywhere a TODOContext had been used.
I imporperly wired a context though the methods used by the store
viewer templates which was not caught by unit tests.  Fortunately
the error was caught by the test.sh for the mdb example.

This change fixes the problem by wrapping a context into the struct used
by the template code.

Change-Id: I8a85042e355752784e0a4c3349c2a8fe154db609
diff --git a/services/store/viewer/value.go b/services/store/viewer/value.go
index 1999837..2efbd29 100644
--- a/services/store/viewer/value.go
+++ b/services/store/viewer/value.go
@@ -13,6 +13,7 @@
 // contains the name of the value, the actual value, and a list of
 // subdirectories.
 type Value struct {
+	ctx     context.T
 	store   storage.Store
 	Name    string
 	Value   interface{}
@@ -59,15 +60,15 @@
 }
 
 // Glob performs a glob expansion of a pattern.
-func (v *Value) Glob(ctx context.T, pattern string) ([]string, error) {
-	return glob(ctx, v.store, v.Name, pattern)
+func (v *Value) Glob(pattern string) ([]string, error) {
+	return glob(v.ctx, v.store, v.Name, pattern)
 }
 
 // Get fetches a value from the store.  The result is nil if the value does not
 // exist.
-func (v *Value) Get(ctx context.T, path string) interface{} {
+func (v *Value) Get(path string) interface{} {
 	path = v.fullpath(path)
-	e, err := v.store.Bind(path).Get(ctx)
+	e, err := v.store.Bind(path).Get(v.ctx)
 	if err != nil {
 		return nil
 	}
diff --git a/services/store/viewer/viewer.go b/services/store/viewer/viewer.go
index 4d64621..c4d091b 100644
--- a/services/store/viewer/viewer.go
+++ b/services/store/viewer/viewer.go
@@ -100,7 +100,7 @@
 	var p printer
 	p.print(v)
 	subdirs, _ := glob(ctx, s.store, path, "*")
-	x := &Value{Name: path, Value: p.String(), Subdirs: subdirs}
+	x := &Value{ctx: ctx, Name: path, Value: p.String(), Subdirs: subdirs}
 	if err := rawTemplate.Execute(w, x); err != nil {
 		w.Write([]byte(html.EscapeString(err.Error())))
 	}
@@ -110,7 +110,7 @@
 // is not found, the value is printed in raw format instead.
 func (s *server) printValuePage(ctx context.T, w http.ResponseWriter, path string, v interface{}) {
 	if tmpl := s.loadTemplate(ctx, v); tmpl != nil {
-		if err := tmpl.Execute(w, &Value{store: s.store, Name: path, Value: v}); err != nil {
+		if err := tmpl.Execute(w, &Value{ctx: ctx, store: s.store, Name: path, Value: v}); err != nil {
 			w.Write([]byte(html.EscapeString(err.Error())))
 		}
 		return