DB stored procedures: use LANGUAGE sql for pure-SQL functions instead of LANGUAGE plpgsql
It has advantages over plpgsql, such as the ability for the planner/optimizer to do inlining.
All stored procedures that only to "return query ...; return;" are candidates for this change.
Migrated from T55 (view on Phabricator)