api: check create_endpoint return value

and don't queue the new endpoint if there was a failure.
Cleanup the cci__ep_t *ep here.

Will need to check the transports to make sure that they do not free the
endpoint.
tcp: don't free endpoint if create fails
sock: don't free endpoint if create fails