Theory of hole spin qubits in silicon and germanium quantum dots