runtime: optionally check all allocations in hashmap.c

Adds the new debugging constant 'checkgc'. If its value is non-zero
all calls to mallocgc() from hashmap.c will start a garbage collection.

Fixes issue 5074.

R=golang-dev, khr
CC=golang-dev, rsc
https://codereview.appspot.com/7663051