Optimize tri_value() a bit
Optimize tri_value() a bit

 - Detect a 0 weak reverse dependency earlier. Being implied is
   rare, and the direct deps don't need to be calculated for symbols
   that aren't.

   Bit cleaner too, and closer to the rev. dep code.

   Shaves a few % off the time spent in tri_value() while writing a
   .config.

 - Look at the symbol's visibility to determine the choice mode instead
   of going to the choice itself. Works since the mode acts as an upper
   bound on the visibility of choice symbols. No detectable performance
   difference, but a bit cleaner anyway.

Piggyback some nits.

ulfalizer/Kconfiglib,ulfalizer/Kconfiglib