Sort rules internally

Rules added to sets (lists smack_accesses) are sorted by a pair of
(subject, object) as a sorting key.

Implementation allows to handle case of multiple rules for the same
subject and object. During adding, if a rule with a given (subject,object)
pair already exists, then merging is performed. That is: the old rule is
replaced by the new 'set' rule or modified by the new 'modify' rule.
This is done to avoid possibility of having many rules with the same
subject and object in one set of rules.