Added flush() method to UDPEndpoint

Since writes are async, flush() can be used to cooperatively block until
they are all complete.
Added flush() method to Stream objects