console: Avoid dereferencing NULL active_console

The console_select() function does not check that active_console is
non-NULL before dereferencing it.  When invoked with qemu -nodefaults it
is possible to hit this case.

This patch checks that active_console is non-NULL before stashing away
the old console dimensions in console_select().

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
