Defect energetics in uranium dioxide by electronic structure and atomistic level simulations