A federal judge blocked Mississippi from enforcing a law that would allow businesses and government workers to refuse to serve same-sex couples and transgender people based on religious beliefs — a ruling that comes six months before conservative Republicans plan to push similar bills in Texas.