Fix bug in pkg.is_installed with certain package names

The current implementation fails under these conditions:

  - the queried package name is part of another package name and

  - the other package is already installed

Example:

``pkg.is_installed('gcc47')`` returns ``True`` when it's not installed, but ``gcc47-libs`` is.

The fix provides an implementation that uses ``pkg_info`` to query exact package names instead of grepping through the list of installed packages.