IPC::Cmd run_forked issue with coderefs

Please find attached 3 patches:

1) IPC-Cmd-0.82-run-forked-1.diff implements usage of select
instead of continuous read and sleep, as discussed earlier,
which lowers CPU usage substantially

2) IPC-Cmd-0.82-run-forked-2.diff fixes issue reported by John:
https://rt.cpan.org/Ticket/Display.html?id=85912

3) IPC-Cmd-0.82-run-forked-3.diff fixes bug introduced with this RT:
https://rt.cpan.org/Ticket/Display.html?id=76901

A bit more details on (3): the issue with POSIX::_exit is that it doesn't flush
buffered filehandles which introduces incomplete writes in child - I've found
this bug while testing patch (2)

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>