Merge pull request #27 from weinhold/upstream

Various Portability Improvements
small cleanup
Do extra checking for choice rules so that they don't interfere with package splits
refactor a bit
make queue_insertn more flexible

Yes, it's an API change, but I'm pretty sure that nobody
other than the solver itself uses queue_insertn.
cleanup hash code, it makes no sense to have an extra type for the mask
small cleanups in pubkey handling
improve fileconflicts code
fix bugs in fileconflicts code and prepare for aliased dirs

Breaks API but that should not be a problem as noone seems to
use the function yet.
remove strange 5 year old TODO file

What does "xml metadata: prereq for store" even mean?
refactor solv demo a bit
refactor: split off openpkgdb()
Reimplement state handling in rpm_by functions

We now have rpm_state_create and rpm_state_free to create/free
the state. API change, but should be pretty internal.
use pgpDigGetParams() if available
remove dead code
improve iterate_filelist, it now calls the callback with a struct filelistinfo

This makes the code extensible, plus we can now pass things like
the diridx and the dirlen which can be used to speed up the
fileconflict code.
three missed dig->pubkey => digpubkey changes
add extra flag paramter to find_fileconflicts

In the future we'll add support for a flag that tells
it to check for aliased dirs.
more speed: read all packages just once in 3rd pass
small fixes