Add interface compatibility checker, more unit tests for Interface class.
Don't include duplicate identifiers in output of Pattern.{src_idx,dest_idx}.