On the energy of symmetric matrices and Coulson's integral formula