Breaking of Ergodicity in Disordered Systems: The Case of Spin Glasses