added `toArray()` method for collections
updated data adapter interface requirements
added `attach*()`/`detach*()` methods to the model when adding a `hasMany` relationship with a through repository (#16)
code refactoring