Sam Allardyce to leave West Ham United after Newcastle defeat