Added handling of hide and preserve markup in rules. Also somewhat different handling of extensional-head relations. More tests.