X-ray absorption spectroscopy investigations into the stability and activity of fuel cell electrocatalysts