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