pc_serial: apply lcr parameters even when unmasking latch reg

No need to change line params even more if it was already the same before.
pc_serial: cache IER and temporarily mask IRQs until dpc done

No need to be flooded by IRQs while filling in the FIFO...
pc_serial: toggle THRE in IER to make VirtualBox happy

Not sure it's needed on real hardware yet.
pc_serial: wait for writes to complete on a sem

This avoids close being called too early and discarding output.
pc_serial: mask THRE again when we're out of data