getByUserID should return null when no user found

User::getByUserID() returns an User instance even if the user is not
found.
Let's return nothing if the user has not been loaded...

As a bonus: the query is now a bit faster since the DB engine stops search
at the first record found
Fix php warning when user not found

Make sure that the returned variable is declared
Update phpdoc for getByUserID
Merge pull request #1577 from mlocati/fix-user-getbyuserid

getByUserID should return null when no user found