AGILE and Swift simultaneous observations of the blazar S50716+714 during the bright flare of October 2007