With a little help from knot theory, scientists have invented a “robust knit” to fight laddering