Adds a missing swap to private TEB fields on dr_app_stop_and_cleanup*(), and a swap back to app fields on detaching thread cleanup.
This fixes problems using droption on client exit in drcachesim tests for #4139 (closed).
Issue: #4139 (closed), #5340 (closed) Fixes #5340 (closed)