Timing performance of the CMS electromagnetic calorimeter and prospects for the future