Distribution amplitudes of light-quark mesons from lattice QCD