Formality and finiteness in rational homotopy theory