Change flush() to follow the ArduinoCore behavior, i.e. flush output

In the case of SoftwareSerial there is no output buffer and thus flush()
does nothing.
Notice that the old behavior was to clear the input buffer.