Allow upstream check to retry

Allow upstream web parsing to be retryed in case of error. The number of retry
can be set with the retry parameter.
Use python3 as sheebang

This follow a PEP (don't remember number) to improve compatibility accross
distro.
Fix missing logging import in error module
Move pacman query into a class

pacman database queries are now handled by a singleton class into pacman module.
This will avoid a huge memory consumption to the current implementation.