fixed handling of tag combinations

in order for faceted search to work, tags should be combined with AND -
previously, OR was being used erroneously (though there were errors in
that logic as well)

thanks to @tillsc, @bengillies and @cdent for providing the SQL fu