target-xtensa: Introduce XtensaCPU subclasses

Register a CPU type per core registered. Save the XtensaConfig in
XtensaCPUClass and copy it from there to CPUXtensaState, to avoid
touching every env->config access for now.

Prepares for storing per-class GDB register count.

Signed-off-by: Andreas Färber <afaerber@suse.de>
gdbstub: Move num_g_regs to CPUState and NUM_CORE_REGS to CPUClass

As a side effect this should fix coprocessor register numbering for SMP.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Introduce CPUClass::gdb_{read,write}_register()

Replace GET_REG*() macros by gdb_get_reg*() inline functions for
clarity and drop breaks after return.

Allows to move target-specific code to new target-*/gdbstub.c files.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Use QTAILQ for CPU list and drop qemu_for_each_cpu()

Signed-off-by: Andreas Färber <afaerber@suse.de>