runtime: add UpdateMemStats, use in tests

Drops mallocrep1.go back to a reasonable
amount of time.  (154 -> 0.8 seconds on my Mac)

Fixes #2085.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/4811045
diff --git a/test/gc2.go b/test/gc2.go
index c5c6cbe..c54d807 100644
--- a/test/gc2.go
+++ b/test/gc2.go
@@ -32,7 +32,8 @@
 			}
 		}
 	}
-	
+
+	runtime.UpdateMemStats()
 	obj := runtime.MemStats.HeapObjects - st.HeapObjects
 	if obj > N/5 {
 		fmt.Println("too many objects left:", obj)