The Senate capped a difficult seven months on Thursday by approving financing for the F.D.A. and expanding access to experimental treatments for people with terminal illnesses.