deduplicate database reading / cleaning
deduplicate repo writing and signing
refactor variable names
Merge branch 'master' into file-pkgcache

* master:
  refactor variable names
  deduplicate repo writing and signing
  deduplicate database reading / cleaning

Conflicts:
	repoman.c