* Avoid keeping list of all packages in memory by pushing each package
directly to the JSON array
* Avoid check for database before pushing each package; do it only before
reaching the next database
* Remove no longer required functions
* Do HTTP head request first when loading database from mirror to avoid
downloading the full database all the time
* Use the last modification date of the local database file because with
the persistent storage even local database reloads became a bit expensive