Templating messages

I'm reworking the search templates.
It's a branch of #1427 so there are some unnecessary bits, I'll remove them once the other PR is merged.

I opened the PR because templates are not my favourite piece of stuff to work on, so feel free to beat me if you see something stupid. :hammer: 

In fact the interesting commits start from here:
https://github.com/emanuele45/Dialogo/commit/fe0297aeaec4e4eb5dd0cd3cd66d2d52c3ce1927
then:
https://github.com/emanuele45/Dialogo/commit/fe0297aeaec4e4eb5dd0cd3cd66d2d52c3ce1927
and:
https://github.com/emanuele45/Dialogo/commit/e8c8e1e844fd8017f181df31d03025b909684d41
for now, I'll add more stuff.