Hope Hicks, one of US President Donald Trump's longest-serving, most trusted aides, is resigning from her job as White House communications director.