x86: Clean up xAPIC-related magics and register accesses

Instead of open-coding, use mmio_read/write for accessing xAPIC
registers. Wrap the address calculations with the helper macro and
use a symbolic constant for the xAPIC ID shift.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>