Defect chemistry of tin(iv)-oxide in bulk and boundary layers