Implement negated search for ticket flags in TicketSearch

... and use it in AgentTicketLockedView, which currently rather clumsily does a search for `TicketFlags => { Seen => 1 } }`, and then reverses the search result in Perl code.