extracted a common viewable module from team and user models

Saw some duplicate code in team and user, so I extracted it. Specs pass but someone with a better understanding of how this code is used should probably test it manually to make sure.