Move threadlocals from andsome.

Change-Id: I08fdd844f60c227113fb00446ff23aa5f94aa1d4