Lots of minor updates for analytics and top apps

Updated graphs on analytics page, added checking for completed
analysis, updated database. Several other minor fixes.