Hope Hicks, one of Donald Trump's longest-serving aides, is resigning as the US president's communications director, the White House announces.