Error handling

The `qRestAPI::sync(const QUuid&)` method returns a boolean value to signal an error, but there is no way to distinguish between errors due to an unknown uuid or other errors like results parsing errors or networking related errors. In a higher-level API, it would be good to be able to distinguish these cases and for example be able to throw different exceptions.

This pull requests adds error handling capabilities similar to what other Qt classes provide. If the `sync` method signals an error by returning `false`, an error code can now be retrieved to get more detailed information. The only backwards incompatible change is the introduction of an additional argument in the `qRestResult::setError(const QString&)` method which now carries a specific error code. I believe that this function is currently used only implicitly in qMidasAPI and not by other external libraries, so there should not be any impact on dependent libraries.