runtime: simpler heap map, memory allocation

The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.

The heap map is in bss.  The assumption is that if
we don't touch the pages they won't be mapped in.

Also moved some duplicated memory allocation
code out of the OS-specific files.

R=r
CC=golang-dev
https://golang.org/cl/4118042
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 47b4e2d..462ac6f 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -436,6 +436,7 @@
 void	runtime·walkfintab(void (*fn)(void*));
 void	runtime·runpanic(Panic*);
 void*	runtime·getcallersp(void*);
+int32	runtime·mcount(void);
 
 void	runtime·exit(int32);
 void	runtime·breakpoint(void);