Improve update.py database performance.

This patch adds indexes to awfy_breakdown and awfy_score and rewrites
the update search queries to be simpler and much faster.