Endpoint implementation with error handling

Endpoint implementation, which parses the endpoints from ```proto://ip:port``` string.
It throws an exception if the string is malformed.
(this exception is ```std::system_error```, it can be an own exception type, and maybe we can use C++11-style error handling later)