Arsenal boost their Champions League hopes with victory over West Ham, who remain in relegation trouble in the Premier League.