Two-loop relations for heavy-quark parameters in the shape-function scheme