What is this device strapped around the nut of the guitar in this image?

It is a string damper - it stops open strings ringing. This can be very useful for a range of playing styles.
I tend to use a handkerchief tucked under the strings for some Satriani-style tapping melodies, as it allows me to use two hands at speed up the neck of the guitar without having to damp every note.