Added nn_errcode function to public API

/*  Given a symbolic error name (e.g. "ETERM"), returns its associated code.  */
/*  Returns -1 if the error name is not used by nanomsg.                      */
NN_EXPORT int nn_errorcode (const char *errname);

nanomsg error codes are platform-specific and their numeric values are currently
only available at compile time.

The nn_errcode function allows callers to get the numeric code for a given
symbolic name.  This is particularly useful for callers which may not have a C
preprocessor available (language bindings for example).

Includes a unit test.

This patch is released under the MIT license.