fix extractArray
fix serializeHasMany
Merge pull request #69 from fsmanuel/fix-extract-array

fix extractArray
Merge branch 'refs/heads/master' into fix-serialize-has-many

Conflicts:
	test/tests.js
Merge pull request #70 from fsmanuel/fix-serialize-has-many

fix serializeHasMany
Fix typo in README.md
Make sure promises are properly assimilated into one another

Mainly fix the recurring pattern
```javascript
return new Ember.RSVP.Promise(function(resolve, reject) {
    promise = ...
    promise.then(function(result) {
      resolve(result);
    });
});
```
which doesn't do more than
```javascript
promise = ...
return promise
```

It actually even hides errors happening within `promise`, as the reject
channel isn't properly connected.
Use one single function for reading the browser's localStorage
Honor the opts.allowRecursive flag in findHasMany
Fix and clean loadRelationshipsForMany

The supposed "array cleaning" by
```javascript
for (var i in recordsArray) {
  if (recordsArray.hasOwnProperty(i)) {
    recordsToBeLoaded.push(recordsArray[i]);
  }
}
```
did actually introduce two extra spurious entries in a case of mine,
so I prefer to rely on the native forEach function to make the right
call of what to include in the iteration.

Also replace the recursive function loadNextRecord by a more functional
variant akin to a left join.
Update loadRelationships to not rely on side-effect modifying in addEmbeddedPayload

The previous implementation of loadRelationships didn't use the return
value of addEmbeddedPayload, but instead just expected that the given
payload object was modified. This can be misleading and lead to bugs.
Don't try to embed records from relationships to foreign adapters
Make findMany reject upon missing records
Provide meaningful reject error messages
Fix query

query previously included all the records which fulfilled exactly the
last of the tests in query, the results of the previous tests were just
overwritten.
A few matter of taste changes of how promises are returned

No functional difference!