Determinant representations of spin-operator matrix elements in the XX spin chain and their applications