A UK judge rules Juan Carlos is immune from claims pertaining to the period before his abdication.