16007: Ensure that updated permission edge overrides edges view
An edge originating from a user can be traversed more than once, if
that edge is the same as the one being updated, ensure that it uses
the updated permission level and not the permission from the edges
view. Necessary when revoking permissions.
Also moved comments into the body of the postgres functions to bring
them closer to the code, this also has the convenient effect of having
the comments appear in structure.sql function definitions so as to be
easier for future developers to find.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>