Add new clio_endpoint_exit function.

Not totally sure about this, but, for simplicity, the user denotes if
the exit is an error, and optionally passes back a message string with
more info.

The error status and the message are then wrapped up in a light (new
clio_err_t) structure which is passed back to the primary routine via
pthread_exit, where the info is caught and logged if its an error. To
facilitate this functionality, the endpoint function is now on its own
thread; it is simply spun off then joined.

Added the noreturn compiler attribute to endpoint_exit to stop it
throwing a warning -- so need to use GCC now...

Added appropriate functions to the generic endpoint. TODO this and
send_msg seem overkill -- maybe pick one...