Hillary Clinton has won the Democratic presidential primary in New York, which she represented in the U.S. Senate for eight years.