Move Pair/Sigma into Builtins namespace

Fixes #1775 (but there is still a related problem to address too,
being #1776)
Check datatypes are not redefined

We were checking, but only seeing if the type constructor was the same,
which is not enough. Fixes #1776.