How did state governments cause trouble for the federal government in its relationships with Spain and Britain? What actions could a stronger federal government have taken to solve the problem?