Nine members of staff at local authorities have been sacked for looking at the personal records of friends and celebrities on the government's National Identity Scheme.