(PDB-1064) Fixed a bug in extract with 2 element expressions

Previously the query engine would fail if a top-level extract's
expression had only two elements (i.e. ["not" ["=" "certname"
"foo.com]]). This commit adds a guard to the extracts used for nested
queries to ensure it doesn't catch the two clause version of top-level
extract.
Merge pull request #1178 from senior/maint/master/extract-fails-with-to-item-expr

(PDB-1064) Fixed a bug in extract with 2 element expressions