in flattenStacks, use a set to test belonging of ordinal Xs

the previous solution in PR #251 was still using relational
operators to test whether points' x coordinates were in the domain

this is not correct for ordinal coordinates, which don't have to be
ordered by the key (the domain specifies the order, not the
relational operators)
a test for ordinal x elastic y
Merge pull request #298 from gordonwoodhull/ordinal-x-elastic-y-2

in flattenStacks, use a set to test belonging of ordinal Xs