Reorganized monitor hooks to include limits file.
Ensures main process gets wait().

When moving from waitid to the current code, if two signals were sent to
the same process, say sigchild and sigterm, sometimes sigterm would kill
the process, with the code for sigchild never running. The problem was
that the call for wait() was only on the handler of sigchild. Before
this was not a problem, since waitid was called on sigchild only for
debugging purposes, with wait() in the handler for sigterm.
Fixes bug for limits in wall and cpu time.

The times were given by the user in seconds, but they were compared as
microseconds in the resource_monitor.
Measuring directory footprint is now optional.

For large working directories, measuring their footprint was very slow
(think du slow).  This commit disables the monitor of the footprint by
default, and it can be enabled with --with-disk-footprint.
Monitor memory peak size rather than current size.
Update worker state to none after we send a reset message.
wait did not like being replaced with waitpid.

Even though wait(s) is functionally equivalent to waitpid(-1, s, 0), when
wrapped like that in the monitor helper we got ECHILD. This commit wraps wait
directly.
Fixes pathname location of helper library.

Sometimes LD_CONFIG would get the library path as a relative path. This
did not work so well when grandchildren processes changed directories.
This commit makes the path absolute.
wait and waitpid were fine. muggins wasn't.

Simplify the wrapping of wait by using waitpid (again). On further
inspection, it was an incorrect pid being returned from the waitpid
wrapper that caused errors. This commit (re)-simplifies the code.
Return failure before applying cvmfs_open on a directory path.

If a path refered to a directory, cvmfs lookup tagged the path as correct, but
cvmfs_open would fail with errors "failed to fetch", and "failed to open".
These errors slowed down parrot greatly. Now we check whether lookup tagged the
path as directory, and if so, immediatly return failure to open the path as a
regular file.
Replaces let with sh arithmetic in ec2_submit_workers