Switching ability of nitro-spiropyran on Au(111): electronic structure changes as a sensitive probe during a ring-opening reaction