Add trendiness function relying on postgresql

Doesn't rely on time, only on id. As questions stack up it will become less sensitive to votes. Hand-waving that as a feature, for now.