Avoid traversing dead `if` branches in bytecode optimiser
There is no point in traversing conditional branches that are
statically known never to be executed. This saves some optimisation
effort, but more importantly prevents variable assignments and
references in those branches from blocking effective constant
propagation.
Also attempt to traverse as much as possible in an unconditional
context, which enables constant-propagation through (linear)
assignments.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
Rewrite the (tail) recursion into an explicit loop. Normalise a
return value of (quote nil) to nil, for easier subsequent
optimisations.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't
traverse dead `if` branches. Use unconditional traversion context
when possible.