[search addon] Fix query comparison

Fix query comparison when determining if search query has changed.  Add
new sameQuery(q1, q2) function which compares two queries returned by
parseQuery, which understands how to compare string queries/regexp
queries correctly.