Refactor hasMany code for comments and clarity

This is a clean-up of the `DS.hasMany` code, which has gotten quite messy. To the best of my knowledge, this does not change any behavior (tests continue to pass) but I believe it improves the clarity of the code.