Optimal Control and Reinforcement-Learning Strategies for Advanced Management of Lithium-ion Battery Packs