Add a convenience function to filter a list of statements (as obtained by [[https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.getBestStatements|mw.wikibase.getBestStatements]]) by qualifier-value. This function would probably look like filterByQualifier( statements, qualifierPropertyId, qualifierDataValue ), where qualifierDataValue is either the full data value… or we special case this for entity ids, so that filterByQualifier( statements, qualifierPropertyId, 'Q123' ) would work.
Alternatively (or additionally) this could itself fetch the statements to filter: filterByQualifier( entityId, qualifierPropertyId, qualifierDataValue ), where the question regarding qualifierDataValue from above remains.
Maybe put this into a new mw.wikibase.filter library.
(This was discussed at the Barcelona Hackathon)