The top vaccine regulator in the US has resigned over the anti-vaccine stance of Donald Trump's health chief.