VERSION: 0.5. -> 0.5..

.. means "post release", which servers no real purpose except to make
sure thack chkrel.sh does not accidentally pass.
fail, PASS_ONLY and PASS_QUIETLY

I have incread the complexity of the pass/fail system in 0unit so that we can
have a chance to clean up after our errors.  When 'CHK' fails, it does a "goto
fail".   We have thus have four ways of ending a test function

        PASS()          -- prints a success message and returns 1.  No cleanup is done
                           in the event of failure.

        PASS_QUIETLY()  -- As PASS(), but it doesn't print a message.  Funtions using
                           this should be called chk_xyz rather than test_xyz.

        PASS_ONLY()     -- Like PASS(), but a failure handler is required.  This is
                           in the form

test_something()
{
        .
        .
        .
        checks
        .
        .
        .

PASS_ONLY();
fail:
        ... clean up after failure of any check ...
}
BUGFIX (elm): error cleanup methods only get the `data`

This is because error cleanup methods are only supposed to delete the `data`
member of the error.  free() is now a valid cleanup function, and
merror_cleanup has been deleted.
ELM: creating a sys_error (including IO_ERROR) always resets errno.

This is because it is common for sys_errors to package up errno.
0unit: refactoring, "chk" and "wrn" can now take varargs.
WRN and FAIL: these warn or fail, but print messages.
BUGFIX: CHK(expr) will no tolerate '%' in `expr`.

Previously, the stringified version of expr was used as a printf-like
format string.  Now it is treated literally, because it is  used as a
"%s" argument.
elm.h -- post scan of comments.

Scanning the comments to see if the merge had obsoleted any of them.  I
don't think that has happened.  But I fixed various sundry errors.
BUGFIX: make clean delete  the correct .o files.

We now actually resepect $(BUILD_DIR)
*_log are constants, not variables.

These pointers used to be variables, they are now macros which directly
dereference underlying static objects.  This means you can now use these log
pointers in static initialisers.
Loggers have refcounts (static ones can be reffed)

Loggers now maintian have a refcount object.  For loggers created with
new_logger this is a true refcount which can be incremented with `ref_logger`.
`destroy_logger` will decrement the refcount and only destroy the logger on the
last ref.

For the four static loggers, `destroy_logger` and `ref_logger` are no-ops which
can safely be called any number of times.
SYS_ERROR and IO_ERROR take fprintf-like  varargs.

The varargs are inserted in msg_prefix: the explanation string that is printed
before errno/strerror.
sys_error unpacks SYS_ERROR objects (and IO_ERROR)

`sys_error` can

(a) Tell you whether a given elm error is a SYS_ERROR, and
(b) Tell you what errno and optionally the filename and strerror are.

If an error is not associated with a file, then `filename` is NULL.
BUGIX: destroy_error is now a nop on NULL input.

It has long been our convention that destroy_xyz does nothing if its argument
is NULL.  Finally, destroy_error comes to the party.
keep_first_error keeps one error of two.

From the comments:
/*
  Sometimes you want to push through a sequence of operations that might fail,
  and only report one of the errors (usually the first).  A helper for this is:
*/
extern Error *keep_first_error(Error *one, Error *two);
/*
  This function returns `one` unless it is NULL and two is not-NULL.  Any
  unused error is silently destroyed.
*/
errors: some assistance for custom error makers.

We have improved the commentary about how to make your own error types.  We
also made it easier to re-use the message error to make your own very similar
type.  This required us to expose a bit more interface, in particular:

        error_fwrite: is now public, so that you can use it in your own method
                      table.

        init_error_v: is a va_args form of init_error, use it as a "super"
                      constructor.
BUGFIX: checkrell.

Various small fixes to checkrel and the documentation.  See the diff How did it
ever work at in the first place type stuff.
Version number increased to 0.6-

In addition we make the commentary for test_versions clearer.
VERSION 0.6.

The changes between 0.5. and 0.6. a sundry things that happened to elm0 while
using it in other projects.  That means there is no clear theme to the changes,
except for pragmatism.

* Test functions can now clean up after themselves if they fail.  If you
  have non-trivial cleanup you must replace PASS() with

        PASS_ONLY();
        fail:
                // perform cleanup actions here

  A side effect is that if you write a test-helper function (`chk`), then you
  can't just `return 1` on success.  Instead you should use PASS_QUIETLY() to
  pass without printing.

* Several changes make it easier to create new error types.

  - the `.cleanup` callback now receives the user-supplied data, while
    destroy_error handles the error object itself.  This means that in the
    common-case, you don't need to write your own callback, `free` will do.

  - `error_fwrite` is can be used as the fwrite callback for errors.  It is the
    callback used by plain-old ERROR, it allows you to create custom types
    that work the same way.

  - `init_error_v` is a vararg version of `init_error` specifically designed
    for plain-old error types.  It means you can write your own variadic error
    constructor that takes printf-like varargs and passes them to
    `init_error_v` as a back-end.

* Several improvements to the handling of system errors:

  - Generating a new system error always sets `errno` to zero.  This is because
    in the common case, we are trying to convert `errno` style errors into elm0
    errors, and therefore we don't the old error hanging around.

 - SYS_ERROR and IO_ERROR can now take printf-like varargs.

 - The new function `sys_error` detects whether a given elm0 error is a system
   (or IO) error and optionally unpacks it (yielding filename and strerror).

* There is a `keep_error` helper which takes two errors (possibly NULL) and
  returns just the first one.  IF the first error is non-NULL the second error
  is silently destroyed.  This is useful during complicated clean-up jobs.

* Changes to 0unit printing

  - The WRN(M) macro prints a message warning of anything you choose.

  - The FAIL(M) macro prints a message and makes the test fail.

  - For some reason, FAIL() is variadic (printf-like) but WRN() is not.

* The management of loggers has been improved

  - The *_log `variables` are now compile-time constants.  That means you can
    use them in static initialisers.  This is useful if you want a global
    variable the point to the `correct` logger from the get-go.

  - Loggers take ref-counts which are decremented by `destroy_logger`.  If the
    logger happens to be one of the four static ones, the refcounts are ignored
    and `destroy_logger` is a nop.  This way you can safely use the `ref_logger`
    and `destroy_logger` without worrying about whether the logger is dynamic
    or static.

* Various bugfixes, read the commit history.