Chelsea returned to the top four in the Premier League after coming from behind to beat West Ham on former manager Graham Potter's return to Stamford Bridge.