For the first time, the U.S. government will pay for a large study measuring whether overdoses can be prevented by so-called safe injection sites, places where people can use heroin and other illegal drugs and be revived if they take too much.