The US national debt has more than doubled in a decade to reach a milestone $40tn (£29.4tn), Treasury figures show.