Spanish judges have ruled in favour of Shakira after finding tax authorities failed to prove the singer was a Spanish tax resident in 2011.