Fix a bug with a missing index in the database.
Fix for RestClient, pkgnames by file basename.

They seem to have never worked.
Use REST to query file basenames.

Use RestClient
Small cleanup for pkgdb_web.