Remove unused code, which was cause of a bug.

In connect_to_endpoint service manager is not used anymore, but this method creates shared pointer to the manager, which keeps it live. It may cause destroying of the service manager from its own method, that leads to segmentation fault.
Fixed bug with lifetime of service manager, part 2.