Electronic structure of defects in the Thomas-Fermi-von-Weizsäcker model of crystals