Basic flow implementation
Fixed some issues that were pointed out.
Added an empty notify_collision method
Merge branch 'master' of https://github.com/kexinrong/NetworkSimulator into Flow
Switched to get_id().
Add env parameter to run process.
Modified packet intialization to match Packet API.
Added stats collection

Only sending flows report metrics: send/receive rate and RTT.
I have used an internal interval_start_time instead of env.interval
because the flow also needs to account for its start/end times
when averaging metrics.

I have assumed the same dictionary format as in host.py.

I am not sure what the flow should report if the report function
is called before its start time. Perhaps the report function should
be called on the flow by the main env only after its start time?
Added default parameter and mutator for initialization.
Updated report function to return a dictionary.
Modified flows to end by a two-way hand shake
Sending flow sends a FIN packet and ends when it receives a FIN
packet in response.
Receiving flow receives a FIN packet, responds with a FIN packet
and ends.
Fixed the issues that were pointed out.

Made dest_host_id an optional parameter and added a mutator for
it.
Changed intial value of end_time to None from -1.
Switched to using self.env.interval.
I am assuming that the main env calls report on the flow only it
is running or has just ended.
Added SendingFlow.constant each constant.
Modified report function for sending flow.

We follow the convention that when a flow is not active, all
metrics (including RTT delay) are reported to be zero. Similarly,
when no packets have been received in an interval, the RTT
delay is reported to be zero.

A potential drawback of this convention is that it may mess
up the overall picture. For instance, if we want to look at average
RTT delay over all flows, the non-active flows would artificially
bring down the average by reporting 0.
Corrected syntax error.

Had used else if instead of elif.
Added self argument in a method.
Corrected doctring format.
Add received_packets.pop().
Added send_packet() method in base class. Packets sent/received
counters are updated in the send/receive packet methods of
base class.
Merge pull request #14 from kexinrong/Flow

Basic flow implementation