Generalize proof length optimization a bit.

Flag ones which actually create a tree (far too slow to run).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>