Fix external solver
Fix external solver

1) No need to use hash table when generating SAT rules for external
solver. Variables are already in a linear array. Fix encoding and
decoding of SAT data.
2) Endless variable loop caused pkg to crash.
3) it->inverse was checked for non-zero, while it should actually be
checked for -1 only. SAT rules produces were all negative.

Submitted by:	hps

khorben/pkg,khorben/pkg,khorben/pkg