Rebase to latest master

As asked by @machty, this is a rebase of crob611 PR (https://github.com/emberjs/ember.js/pull/2214).