The index of a threefold canonical singularity