Add support for avreceiver control in auto_scenario
Flush data before closing tcp connection

Enforce ecore_con to send all data. This fix the bug where calaos
installer was unable to load/save config through the json api because
the connection was closed before the last data was sent.