implement promises and tests
this MR does a major API refactoring. instead of using connection.sendRequest(request, onResponse, onProgress, onError) we now replace onResponse and onError with a promise, i.e.
connection.sendRequest(request, onProgress).then(onResponse)
furthermore this MR implements a test-backend and some tests to verify the functionality