added Random; clean up arity->type mapping in rql_rewrite.py
add Union.
tests for IndexesOf