x86: convert cpu_to_apicid to be a per cpu variable