Recreate context when updating lucene index

The Lucene background task would keep an EntitiesContext instance cached
for the lifetime of the web app. The context itself caches Package
entities, so the Lucene index would be updated with obsolete data,
including wrong download counts.
Merge pull request #1638 from citizenmatt/1637-lucene-context

Recreate context when updating lucene index