Advances in electronic structure methods for defects and impurities in solids