Jamie Whincup recovered from an early spin to win a dramatic second V8 Supercars race at Symmons Plains.