Merge pull request #52 from blabaere/master

Makes connect function to return an Endpoint
Adds error constant

Adds error contants to libnanomsg.
Makes the test helper bind & connect functions to retun an endpoint