Fix encoding error related to xapian_similar.important_terms

Fixes mysociety/alaveteli/#1120.