nng_fini is used to terminate the library, freeing certain global resources.
This call is unnecessary for most cases, other than debugging. It should
only be called at the end of a session. It must not be called
concurrently with any other library function - it is not reentrant or
threadsafe.