lib: remove some extra allocs
lib: fix idivn and use it for toString(10)