Democratic presidential hopefuls Hilary Clinton and Bernie Sanders have squared off in a bruising debate in New York.