Rudy Giuliani’s communications director has resigned from her position, ending a nearly two-year stint as the former New York City mayor faces mounting legal problems.