Import the builtins module properly

According to the documentation, __builtins__ is an implementation detail, and
was a dictionary rather than a module in my experience.
Add link type constants
Simplify __iter__ function