Revert "Improved generic build_query function - prevented attaching empty terms to query."

This reverts commit 646810bd5baa4e5b27b1de790bbf340395940d49.
Don't search for falsy values
Merge pull request #3378 from dimagi/revert-case-list

Revert Case List report behavior