Add DETERMINISTIC_RANDOM_IDS option.

When True, this gives each Triple a consistent 'rand' value. This is convenient
for debugging.