Added primary_key support for has_many

Also tested foreign_key support explicitly. Hopefully that's fairly straight forward, but let me know if you have any concerns. As mentioned in #60.