On the dimension of contact loci and the identifiability of tensors