Add a preliminaty run_hook function which will pick up hook functions in
/usr/local/etc/poudriere.d/hooks
No need to prepend the hook script with _hooks
Add First kind of hooks pkgbuild: arguments for pkgbuild.sh are:

$1: status can be : success, ignored, failed, skipped

$2: origin of the port concerned

$3: name of the port concerned

$4:
   if ignored: the ignored reason is passed
   if success: nothing
   if failed: the failed phase
   if skipped: origin of the failing ports responsible for this port to be skipped

$5: only failed has a $5, this is the path on the system to the log file
Fix run_hook()'s last statement being false if no hook found, leading to build failure
Skip comments when converting jails
Woops, skip comments when converting porttrees
ports -F: Fix not populating method file

Submitted by:	gustau.perez@gmail.com
Fixes:	[3475d66d6e1]
Style cleanup, no need to escape newline with && and ||
Return 0 at end of some functions to avoid style changes causing non-zero exits
Convert test to []
Wrap long lines
Convert simple if blocks to &&
Remove gratuitous whitespaces
Uniformly use ' done' or ' fail' after messages (keep whitespace for now)
Simplify options block. This $$(opt1 + opt2 + optN) staff is fancy, but
all options are exclusive (as i understand), so usage by default should work.
Don't use || .. && unnecessarily
Don't use || .. && unnecessarily;
Use a trick to make second command in pipeline (tar) fail if first (cat)
return error.
These variables are no longer needed
New index builder for pkg_* bulks

Reimplement in plain C the make_index to compute index on pkg_* bulks.
This version is a lot faster than the old awk version.
Keep the old make_index.awk until we are 100% sure of the correctness of make_index

Submitted by:	David Demelier <demelier.david@gmail.com>