LEON3: fix console close handling

On SMP rtems_interrupt_lock_context must be used. Most tests fail with a
NULL pointer exception when exiting, except on NGMP where main memory is
at 0x00000000.
LEON3: devfs free nodes must be sized

.. according to the maximum number of termios ports which is
8. Since LEON3 uses PnP to find how many UARTs there are
present we must make sure worst case work.

The current maximum of 4 free nodes caused for example the
GR712RC with its 6 UARTs to fail during devfs02 test.