Begin rpmte transition from rpmfi to rpmfiles

- What rpmte wants is the file set, not an iterator, so that's what
  we grab on rpmteNew(). However rpmteFI() is a public API whose
  semantics we need to preserve for the time being so lazily
  create an persistent iterator on first rpmteFI() call.
- rpmteSetFI() is now rather backwards, it should be rpmteSetFiles()
  instead but fi->apath stands in the way ATM. Sigh.
Switch countFiles() from rpmfi to rpmfiles

- Need to do more work to get the same silly number, this particular
  case doesn't really look like progress :)
Switch fingerprinting main loop from rpmfi to rpmfiles

- The internals already use rpmfiles random access anyway, rpmfi
  only gets in the way there
Eliminate rpmteFI() uses from transaction skip policy calculations

- Grab files and file states from the main loop and pass as arguments
  to skipInstallFiles() and skipEraseFiles(), neither actually
  needs the transaction element otherwise.
- Use local iterators in both skip*Files(), not that it actually
  matters here other than eliminating rpmteFI() uses
Eliminate rpmteFI() uses from rpmtsCheck(), part 1

- Use local iterator on rpmteFiles() for installed file conflicts
  checking.
Eliminate rpmteFI() uses from rpmtsCheck(), part 2

- Use local iterator on rpmteFiles() for removed files checking
Eliminate rpmteFI() use from rpmFindBaseNamesInDB()

- Use local iterator on rpmteFiles() instead
Eliminate rpmteFI() use in rpmteColorDS()

- Use a local iterator on te->files instead
Fix callback thinkos from commit 72bd2de21e649c579bb2fba2aeabbdb401b0d246

- Issuing RPMCALLBACK_UNKNOWN callbacks doesn't seem like that bright
  an idea... looks like just a typo/thinko from the changed arguments
  and all. Not that it seems to make much of a difference in practise.
Separate package building from fsm struct entirely

- We have everything we need in rpmfi[les], eliminate the fsm
  foobar out of the picture entirely. Also use a separate iterator
  (instead of an external index variable) for walking the files
  when looking for symlinks, now that we can.
Lift rpmPackageFilesArchive() over to librpmbuild

- No code/functional changes here, just straightforward move
  and make rpmPackageFilesArchive() static
Eliminate some build remnants from fsm
Use accessor functions for file and directory count throughout rpmfi

- No functional changes, just making next steps easier
Add a helper function for pool<->fn comparisons in rpmfilesFindFN()

- The comparison is the same whether doing bsearch or liner lookup...
- Use accessor functions instead of direct struct accesses, primarily
  to make next steps easier
Use accessor functions for file and directory names and id's

- No functional changes, just making next steps easier (and eliminating
  redundant code as well)
Split file path "tuple" into its own datatype from rpmfiles

- Add a new datatype and a bit of API for path data from headers,
  adjust callers within rpmfi to use it.
- The file name data is used all over the place within rpm, mostly
  with ad-hoc manner and missing validations etc. While the newly
  added API is rpmfi-internal for now, this should prove useful
  later on for other purposes as well. For now we're only interested
  in being able to handle two different sets of paths alongside
  each other.
Allow specifying the tag from which path data is created

- Relocated packages store the original data in RPMTAG_ORIG* tags,
  we'll need to be able to access those as well.
Store original path data in rpmfi for relocated packages

- Relocation is relatively rare, so instead of storing the data within
  rpmfiles, we allocate it separately if needed. This also allows
  nicely handling the normal case where ORIG paths are the same
  as actual paths, ie we simply point it to the same data (and take
  care not to free twice...)
Add a bit of API for accessing the original paths

- Especially rpmfiOFN() and its underlying buffer is more than a bit
  dubious, but can't really help it as people are going to expect
  it behaving identically to rpmfiFN(). And they can't share the
  same buffer as somebody is going to be tempted to do eg
      if (strcmp(rpmfiFN(fi), rpmfiOFN(fi)))
          /* file has been relocated */
- Based on ffesti's original work on the subject
No longer use apath for installing packages

 * Set ORIGBASENAMES for source rpms
 * Use ORIGBASENAMES for for finding files from the archive
 * Get rid of the code setting apath for the installation use case