Kanye West has agreed a settlement with a former assistaant who had accused him of sexual assault and harassment.