Allow empty device_name in the API

Change-Id: I8fa9e647d525aa0837926ab066ab94dc10f642f6
Fix previous commmits bugs

 * legacy swap/ephemeral are dict
 * connection_info must be parsed as json
 * ephemeral's legacy num is not set properly
 * swap's legacy virtual_name is not set

Change-Id: I51019ef45264250ec2f8285157760f0366744fbb