AGILE detection of variable gamma-ray activity from the blazar S5 0716+714 in September-October 2007