Abort when memory allocation fails

This patch adds an aborting implementation of the following functions:

malloc
calloc
realloc
strdup
strndup
asprintf

and changes all calls to them to their aborting counterpart (prefixed by
nm_, e.g nm_malloc).

Why? Because we really, really, really don't handle
memory allocation failure gracefully at all, ever. Maybe we want to
pretend that we do by doing:

if ( ptr = malloc(sizeof(foo)) == NULL)
    return NULL;

But how is anyone supposed to know that we just ran out of memory from
that? Not that it matters since naemon is not designed to degrade
gracefully *anyway*. What would we do if we somehow successfully
identified that we have no memory? It's not like we can do anything
worthwhile anyways, say, like running checks or sending notifications or
...

This has the positive side effect of getting rid of a lot of pointless
complexity and silencing a whole bunch of warnings about "unused return
values" and the like. See #69.

Anyhow, the aforementioned checks for MA failure were not really that
common anyway, meaning that an actual scenario where we had really run
OOM would be more likely to result in a segfault than anything else.

In all, I could find *one* place where we actually did something
productive in case memory was not returned, namely when we were about to
start a new worker. And what did we do then? Log it. And abort.

In conclusion, we no longer hide/escalate errors for "someone else" to
deal with for any value of "someone else" that equals "noone".

goto endrant;

This partially fixes #69.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
daemon: Abort when failing to chdir()

We don't want to run in daemon mode if we don't know where we're
running. This patch makes sure that our attempt to chdir to / (if we
don't dump core) or $HOME (if we do) is successful. Otherwise, we abort.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
utils: Bail if we fail to truncate lockfile

If we can't truncate it, we're most likely not going to be able to write
our PID to it. Bail early, and let the user know what's going on.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
Merge pull request #73 from catharsis/abort-on-failed-chdir

daemon: Abort when failing to chdir()
Merge pull request #75 from catharsis/check-ftruncate-ret

utils: Bail if we fail to truncate lockfile
Merge pull request #70 from catharsis/aborting-malloc

Abort when memory allocation fails