Initial support for SingleX, FirstX and Distinct operators in Relational

Just the "Initial support for SingleX, FirstX and Distinct operators in Relational" commit.