add foreign keys for pool_families_provider_accounts
fixing habtm between provider_accounts and pool families
and fixing an api test
fix lately added tests that break on the FK constraints