Enhance the query planner to exploit transitivity of join constraints in
a multi-way join.

FossilOrigin-Name: 13171eb5dc19733276fbfd5515d75b70a9f5f5d7
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 74fa0b3..d5cb697 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -576,6 +576,11 @@
 #define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))
 
 /*
+** Determine if the argument is a power of two
+*/
+#define IsPowerOfTwo(X) (((X)&((X)-1))==0)
+
+/*
 ** The following value as a destructor means to use sqlite3DbFree().
 ** The sqlite3DbFree() routine requires two parameters instead of the 
 ** one parameter that destructors normally want.  So we have to introduce