Massachusetts would lose an estimated $400 million in federal dollars next year and $800 million the following year in the federal budget deal moving through Congress, cutbacks that could slow the state’s tenuous economic recovery, regional economists said.