Make GSR and D thread-local.
Merge pull request #32 from hermannloose/threadlocal-registers

Make GSR and D thread-local.