simplify endpoint lookups

We only need to check if the endpoint namespace hash contains a uri key in
one place. It makes sense to leave that check in 'uri_from_hash' and
remove it from 'endpoint'. This just makes following the logic a tiny
bit easier and removes redundant code.

Change-Id: Ie8e66ae3ab4204b2e96e8cba68f7294df8bd571b
Merge "simplify endpoint lookups"