optimizer: transform (if v x v) to (if v x #f)

A few changes in the beginning of optimize_branc

Add (if v x v) => (if v x #f)

and in test position, swap the order of
  (if v v x) => (if v #t x)
and
  (if v #t #f) => v