include/gitlab: Make _gitlab_get() and _gitlab_post() handle errors
When an API call fails, GitLab usually returns HTTP 200 and a JSON
object with an error message. Because HTTP 200 indicates success,
_gitlab_get() and _gitlab_post() assume that the call succeeded and
do not return an error.
This commit modifies _gitlab_get() and _gitlab_post() to check if
the received JSON object contains an "error" member, which should
not be found in any non-error results. If an "error" member was
found, the API call is assumed to have failed.