Infer type of hasMany relationship from the key

This aims to implement https://github.com/emberjs/data/issues/1190.