try to nail shutdown race conditions in runtests

add a new halcmd primitive
check whether adding it at the end changes runtests behavior
if it does - telltale for a shutdown race

the sleep command might be independently useful