Added a mutex for the stats struct in peer. Updated the send/receive methods to use add methods to update the stats.