Split Installation status messages so there is a separate Extract phase.

This moves the progress bar from a single 'Installing/Upgrading' output
to the Extraction message. The old way was showing output from deinstalls
before showing 'Installing/Upgrading and also messages after which was
confused with the next package being installed.

The progress bar was also only capturing % of the extraction phase anyhow
and was missing accounting for all of the other actions of installation
such as scripts. It also was not showing until after the installation
had actually been processed some due to the first tick not being until
extraction.

This removes the need for the meta package extract hack in
pkg_add_common() and do_extract().

  # pkg install -f git
  ...
  [1/1] Reinstalling git-2.0.2_1...
  Updating /etc/shells
  ==> You should manually remove the "git_daemon" user.
  ===> Creating users and/or groups.
  Using existing group 'git_daemon'.
  Using existing user 'git_daemon'.
  [1/1] Extracting git-2.0.2_1: 100%
  Updating /etc/shells

  # pkg install git apache24 xorg
  ...
  [1/3] Installing git-2.0.2_1...
  ===> Creating users and/or groups.
  Using existing group 'git_daemon'.
  Using existing user 'git_daemon'.
  [1/3] Extracting git-2.0.2_1: 100%
  Updating /etc/shells
  [2/3] Installing apache24-2.4.10_1...
  ===> Creating users and/or groups.
  Using existing group 'www'.
  Using existing user 'www'.
  [2/3] Extracting apache24-2.4.10_1: 100%
  /usr/local/share/examples/apache24/httpd.conf -> /usr/local/etc/apache24/httpd.conf
  [3/3] Installing xorg-7.7...

Issue:	#758
Issue:	#923
pkg add: Allow event output to be recursive to fix output.

Use a tree output to make it more clear what is happening.
install/upgrade are not affected by this as they still have a job and
use proper ordering. pkg add needs special handling since it will start
installing deps in the middle of installing a package, and its deps may
start installing deps as well.

This is somewhat of a hack. It would be better to create a real job out
of the pkg add needs before processing anything.

  # pkg add /var/cache/pkg/libreoffice-4.2.5_4-8f497a08ab.txz
  Installing libreoffice-4.2.5_4...
  `-- Installing GentiumBasic-110_1...
  `-- Extracting GentiumBasic-110_1: 100%
  `-- Installing clucene-2.3.3.4_4...
  `-- Extracting clucene-2.3.3.4_4: 100%
  `-- Installing crosextrafonts-caladea-20130214...
  `-- Extracting crosextrafonts-caladea-20130214: 100%
  `-- Installing crosextrafonts-carlito-20130920...
  `-- Extracting crosextrafonts-carlito-20130920: 100%
  `-- Installing desktop-file-utils-0.22_1...
  `-- Extracting desktop-file-utils-0.22_1: 100%
  `-- Installing hunspell-1.3.3...
  `-- Extracting hunspell-1.3.3: 100%
  `-- Installing hyphen-2.8.7_1...
  `-- Extracting hyphen-2.8.7_1: 100%
  `-- Installing libabw00-0.0.2...
  |   `-- Installing libwpd-0.9.9_1...
  |   | `-- Installing libgsf-1.14.28_1...
  |   | `-- Extracting libgsf-1.14.28_1: 100%
  |   `-- Extracting libwpd-0.9.9_1: 100%
  `-- Extracting libabw00-0.0.2: 100%
  `-- Installing libcdr-0.0.16_1...
  |   `-- Installing libwpg-0.2.2_2...
  |   `-- Extracting libwpg-0.2.2_2: 100%
  `-- Extracting libcdr-0.0.16_1: 100%
  `-- Installing libcmis-0.4.1_3...
  `-- Extracting libcmis-0.4.1_3: 100%
  `-- Installing libe-book00-0.0.3...
  `-- Extracting libe-book00-0.0.3: 100%
  `-- Installing liberation-fonts-ttf-2.00.1,1...
  `-- Extracting liberation-fonts-ttf-2.00.1,1: 100%
  `-- Installing libexttextcat-3.4.4...
  `-- Extracting libexttextcat-3.4.4: 100%
  `-- Installing libfreehand00-0.0.0...
  `-- Extracting libfreehand00-0.0.0: 100%
  `-- Installing liblangtag-0.5.4...
  `-- Extracting liblangtag-0.5.4: 100%
  `-- Installing libmspub-0.0.6_2...
  `-- Extracting libmspub-0.0.6_2: 100%
  `-- Installing libmwaw-0.2.0...
  `-- Extracting libmwaw-0.2.0: 100%
  `-- Installing libodfgen-0.0.4_2...
  |   `-- Installing libetonyek-0.0.4...
  |   `-- Extracting libetonyek-0.0.4: 100%
  `-- Extracting libodfgen-0.0.4_2: 100%
  `-- Installing liborcus-0.5.2...
  |   `-- Installing libzip-0.11.2_1...
  |   `-- Extracting libzip-0.11.2_1: 100%
  `-- Extracting liborcus-0.5.2: 100%
  `-- Installing libvisio-0.0.31_2...
  `-- Extracting libvisio-0.0.31_2: 100%
  `-- Installing libwps-0.2.9_2...
  `-- Extracting libwps-0.2.9_2: 100%
  `-- Installing linuxlibertine-g-20120116...
  `-- Extracting linuxlibertine-g-20120116: 100%
  /usr/local/lib/X11/fonts/LinLibertineG: caching, new cache contents: 10 fonts, 0 dirs
  /usr/local/lib/X11/fonts/LinLibertineG: caching, new cache contents: 10 fonts, 0 dirs
  /var/db/fontconfig: cleaning cache directory
  /root/.cache/fontconfig: not cleaning non-existent cache directory
  /root/.fontconfig: not cleaning non-existent cache directory
  /usr/local/bin/fc-cache: succeeded
  `-- Installing lp_solve-5.5.2.0...
  `-- Extracting lp_solve-5.5.2.0: 100%
  `-- Installing mythes-1.2.4...
  `-- Extracting mythes-1.2.4: 100%
  `-- Installing nss-3.16.3...
  |   `-- Installing nspr-4.10.6...
  |   `-- Extracting nspr-4.10.6: 100%
  `-- Extracting nss-3.16.3: 100%
  `-- Installing poppler-0.24.5_4...
  |   `-- Installing openjpeg15-1.5.2...
  |   `-- Extracting openjpeg15-1.5.2: 100%
  |   `-- Installing poppler-data-0.4.6...
  |   `-- Extracting poppler-data-0.4.6: 100%
  `-- Extracting poppler-0.24.5_4: 100%
  `-- Installing redland-1.0.17_3...
  |   `-- Installing libltdl-2.4.2_3...
  |   | `-- Installing indexinfo-0.2...
  |   | `-- Extracting indexinfo-0.2: 100%
  |   `-- Extracting libltdl-2.4.2_3: 100%
  |   `-- Installing raptor2-2.0.14...
  |   | `-- Installing yajl-2.1.0...
  |   | `-- Extracting yajl-2.1.0: 100%
  |   `-- Extracting raptor2-2.0.14: 100%
  |   `-- Installing rasqal-0.9.32_1...
  |   `-- Extracting rasqal-0.9.32_1: 100%
  `-- Extracting redland-1.0.17_3: 100%
  Extracting libreoffice-4.2.5_4: 100%

Issue:	#923
Also split out deleting files

Removes need for special handling of 0-sized archives in pkg_delete_files().

  # pkg delete -f git apache24 xorg
  [1/3] Deinstalling git-2.0.2_1...
  Updating /etc/shells
  ==> You should manually remove the "git_daemon" user.
  [1/3] Deleting files for git-2.0.2_1: 100%
  [2/3] Deinstalling apache24-2.4.10_1...
  /usr/local/etc/apache24/httpd.conf
  [2/3] Deleting files for apache24-2.4.10_1: 100%
  [3/3] Deinstalling xorg-7.7...

Issue:	#758
Add an uncrustify configuration file to help properly formatting
Improve a bit uncrustify conf
Don't crash if PUBKEY is not set when using SIGNATURE_TYPE:PUBKEY

Reported by:	RootWyrm on freenode
Undocument @owner and @group with no argument since they don't work as intended when staging as a regular user.
See bug #730
Update document date
Update to pre-alpha12
Fix printing of bad repository vars
sbuf_finish() is proper here, sbuf_done() just checks if it is finished
Do not accept modes adding or removing rights (make it fatal when parsing plist)
Filter out a+ and a- modes

Reported by:	antoine
Make @owner/@group without an arg set back to default root/wheel as previously documented

I thought a bit about it and if some unstaged or NEED_ROOT ports use @owner/@group without an argument they will get what is documented
Factor out free of previous owner/group
Plug kyua testing with make check/distcheck
Fix pkg.sh test script
Fix pkg annotate -y
Remove pkg -v test which makes little sense
Fix pkg annotate regression test script