make device_users return only distinct usernames

also possibly improve performance insignificantly
Merge pull request #3046 from dimagi/phonelog-device_users

make device_users return only distinct usernames