Add variable ordering to ambqi.  Bug fix to macros. More preparation for CASC proofs.