[sanitizer] fix linux_dirent for SANITIZER_X32; based on patch by H.J. Lu
[asan] Fix x86 asm instrumentation to preserve flags.

This change also enables asm instrumentation in asan tests that was
accidentally disabled yearlier, and adds a sanity test for that.

Patch by Yuri Gorshenin.