The Hammers twice took the lead at the London Stadium and could not take full advantage of Nottingham Forest’s defeat to Everton.