End-to-End Framework for Predicting the Remaining Useful Life of Lithium-Ion Batteries