refactored to use the misc1 package

The package provides a bit different variant of what was in the
overlord/private/util.rkt, making it shared code.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>