Fix nullptr dereference in workq.
Enable profiling option in cmake.
Fix owner loss during link.
Wait until element is fully unlinked, before re-inserting it.
Move some big functions from inline to exported.
Simplify wait_unlinked.