Fix references in V3 payloads
Fix references in V3 payloads

V3 API doesn't return any of the records more than 2 times. If a record
is already included in the response any other occurences will be
represented as a reference, ie. a hash with just an @href. Ember Data
doesn't play nice with such references as it needs an id to identify a
record.

The code in this commit traverses payloads from V3 API and adds an id to
each of the references that are present.

For example a following payload:

    {
      "@href": "/build/1",
      "@type": "build"
      "id": 1,
      "state": "passed",
      "branch": {
        "@href": "/repo/1/branch/master",
        "name": "master",
        "lastBuild": {
          "@href": "/build/1"
        }
      }
    }

Will be changed to:

    {
      "@href": "/build/1",
      "@type": "build"
      "id": 1,
      "state": "passed",
      "branch": {
        "@href": "/repo/1/branch/master",
        "name": "master",
        "lastBuild": {
          "@href": "/build/1",
          "id": 1
        }
      }
    }

In this case an "id" field was added to "branch.lastBuild" field.

fotinakis/travis-web,travis-ci/travis-web,2947721120/travis-web,fauxton/travis-web,fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,fauxton/travis-web,fotinakis/travis-web,2947721120/travis-web,2947721120/travis-web,travis-ci/travis-web,fotinakis/travis-web,fauxton/travis-web,fauxton/travis-web,2947721120/travis-web