Changed language of `update_hot_and_trending_for_blocks` to PlPGSql to avoid performance problems. See merge request !264