First-principles study of the electronic structure and magnetism of the element-doped SnO2(001) surface