TST/API/BUG: resolve scoping issues in pytables query where rhs is a
             compound selection or scoped variables

             e.g. 'l1=selection.index' and 'l1=l', where l = selection.index
                  were failing
Merge pull request #5566 from jreback/hdf_select

TST/API/BUG: resolve scoping issues in pytables query where rhs is a compound selection or scoped variable