Perform text is_deleted filter on database side
Fix proposal changes counter (fixes #306)

While at it, calculate count on database side.