Tighten up Literal equality testing

Previously raised exception if compared to object of different type rather than fail.
Fix comparison of Literal with non-literal
Fix comparison of records whose attributes are in diff orders

Order the attributes prior to comparison
Merge pull request #10 from millr/master

Equality testing fixes