Clear the HasDirAuto and HasDirAutoSet flags when setting dir to an invalid value. Bug 831287, r=ehsan
Distinguish between bdi with default auto direction and with explicit auto-direction. Bug 832644, r=ehsan