runtime: Fix interaction between Goexit and defers

When running defers, we must check whether the defer
has already been marked as started so we don't run it twice.

Fixes issue 8774.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/142280044