ELF: An Early-Exiting Framework for Long-Tailed Classification