Spectroscopy of doubly-charmed baryons from lattice QCD