Democratic victories across Republican strongholds threaten to derail Trump’s agenda and reshape the final two years of his presidency