performance improvements and other changes to pkgupgrade.rb

- do pkg_info -oa and parse it to reduce the times of executing
  command

  doing pkg_info -o for each package takes much cost on some hardwares
  which performance is very poor.

- log pkg_info and version parse errors
- refresh index only if ftpindex is modified
- refresh pkgdb cache only if pkgdb directory is modified. and also
  change debug logs to info
Merge pull request #155 from reallyenglish/mitsuruy

performance improvements and other changes to pkgupgrade.rb