US supreme court rules in favor of gay marriage nationwide