MFC: r241737,r246790,r247060,r247841,r248033,r248133,r255468,r256450,r256770
     r256971,r256978,r257051,r257142,r257145,r257146,r257147,r257148,r257149
     r257158,r257193,r257377,r257378,r257400,r257505,r257668,r257701,r257945
     r258020,r258226,r258348,r258550,r259266,r259773,r259774,r259775,r262400
     r262401,r262419

Sync pkg(7) with head:
- signature checking
- respecting and reading repository configurations
- support pkg bootstrap -f

Direct modifications:
- Support old libarchive
- Support old openssl API
- Define non yet existing elf macros