Added error reporting to qRestAPI.

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. There are no backwards-incompatible changes in the API and all dependent projects will still compile without changes.