fix heap/remove bug, added a few unit tests

	* rep/data/heap.jl, rep/test/autoload.jl: fix heap/remove bug,
	added a few unit tests