Candidates for the Democratic race for the White House clash on gun control and healthcare in their liveliest TV debate so far.