dlib: app Unique function; rename loop.go to misc.go