Bug 137191 - queries optimization without applying restrictions
Bug 137191 - applying restrictions to size and depth of query
Bug 137191 - replace SMWDescription::equals to comparation of "sorted hashes"; calculate description size according to optimization
Perform elimination of identical terms in conjunctions and disjunctions;
Count optimized query size (cost) more correctly;
Remove optimizer enable/disable setting.