fix non-pointer uintptr -> uint64, export NextUID

A trivial tweak. Fixes type semantics for UID, and allows other iterator implementations to use global UID namespace.

(I've signed CLA)