Soliton resolution along a sequence of times for the energy critical wave equation