Update the maybe_yield/request_vcore functions

Remove dependence on lock by using builtin __sync_test_and_set().  Also
allow the spin count to be specified via an environment variable.  We
update the default to match the default assumed by libgomp when yielding
an OS thread.  We should probably determine this ourselves using
autotuning methods or otherwise.