Add EndMeasureValue for closing and fetching result of time measurement.
Bugfix: BufferCopy
Add extra param for NewServerConnection to return error codes.
Hide internal function: ServerConnection from API
Add EndMeasureValue
Redmine #2137
Merge pull request #371 from maciejmrowiec/master

performance diagnostics hooks + BufferCopy fix #2137