Density functional calculations for Zintl systems: structure, electronic structure and electrical conductivity of liquid NaSn alloys