Add extra param for NewServerConnection to return error codes.
Hide internal function: ServerConnection from API
Add EndMeasureValue
Redmine #2137