A bit of reworking of the controller

Signed-off-by: emanuele <emanuele45@gmail.com>
Try to change like-stats queries to work in postgre

Signed-off-by: emanuele <emanuele45@gmail.com>
Reusing functions is nice! :P
The query with a sub-select looks "easier"
Some rewriting of the dbMostLikedTopic function
Merge pull request #4 from emanuele45/LikeStats_tweaks

Like stats tweaks