Handle the situation when an Update object has no user attached

I ran into this while trying to debug an SQL error and was printing Update
objects that had no user attached
Update assign_alias to use a subquery as asked by postgresql

Currently postgresql complains about the group_by argument and asks that all the
elements in the SELECT also appear in the GROUP BY, which is indeed how it
should be (thanks sqlite!).

With this commit we replace the main query by a subquery so that we can keep the
GROUP BY the way we want and just retrieve the Update object that fits the
Update.id found by the subquery.
Merge pull request #81 from fedora-infra/assign_alias_changes

Assign alias changes