Fixing primary key assignment for habtm association

Looks like `deep_cloneable` is treating a HABTM relationship the same as a has_many relationship, which results in an exception because `deep_cloneable` tries to assign the primary key of the cloned object.  HABTM relationships use join tables, so assigning a primary key doesn't work.  This PR just makes sure the cloned object responds to the call to `#{primary_key}=` before calling it.