Add multi-component analog to component_for_entity

This is the same version I had in my original pull request, I just copied it over to yours (along with the test cases) so @seanfisk can merge a single branch back into his repo, if likes the change.