Move something in JoinDependency and JoinAssociation from squeel to polyamorous

Hi @ernie,

I have moved code which combined Polyamorous tightly in Squeel to here. Would you please have a look? If there are more things need to be moved, just tell me. After this patch is merged, I will remove relative code in Squeel immediately. Thank you very much.