unix: optimise UDP buffer allocation

Instead of always allocating a 64KB buffer, use FIONREAD to check the size of the next incoming packet.

I intended to use FIONREAD here to check if any packet is pending, and avoid allocating a buffer (simply returning instead) if no packet is pending.  However, this isn't possible with FIONREAD: if a zero-byte packet is pending, we would spin forever as the socket will appear readable but we'll never read the packet.

Still, this is a minor worthwhile optimisation.