Fix for read(buf, len) in WifiClient and Firmware

read(buf,len) was not returning the bytes actually waiting to be read.
And it was not returning only the requested bytes but many more.