The calculus of functors and the EHP spectral sequence