Extract embedded `belongsTo` records properly

`sideload` won't consider relationships/embedded records, by using
`extractRecordRepresentation` we'll recurse into the record (similarly
to `extractEmbeddedHasMany`).
Merge pull request #637 from sandstrom/extract-embedded-belongs-to

Extract embedded `belongsTo` records properly
Use of references instead of clientId
Added failing test for embedded belongsTo JSON serialisation
fix includeId typo for embedded belongsTo records in JSON serialisation
Remove unused model state
generateIdForForRecord should reify adapter
set default_external for ruby 1.9
Merge pull request #647 from mreinsch/encoding

make sure to read all files in UTF-8 encoding
Address issue with embedded hasMany creation

Fixes #633. This ensures that when creating a new
record in an embedded hasMany relationship, either
via `post.get('comments').createRecord` or via
`Comment.createRecord({ post: post })`, both the
child and parent will become dirty.

This retains the "dirty tree" semantics, which
will walk up and down the tree of embedded
relationships and mark things dirty.
Created embedded records should dirty parent

Previously, embedded records (those without IDs)
that were created via ManyArray's `createRecord`
method were not properly being saved, nor dirtying
the parent's tree.

This commit ensures that an embedded record's
parent is saved on its reference when it is
added to the many array for the first time.
JSON Serializer type for embedded belongs to.
Merge pull request #659 from mspisars/master

Typo in JSON Serializer
Merge pull request #650 from lord-spam/belongs-to-serializer

Test an fix JSON serializer for embedded record updates