[FIX] website_mail: cache incoherence

Postgres apparently implicitly casts strings to integers when doing id
requests (and maybe in other situations?).

If a developer browses using a string id (e.g. from web) on a table using
integer ids, the database will return a value with an integer id, which the
cache won't be able to associate with the record it asked stuff for. This will
lead to asking for the same fields again, getting the same situation forever
(or at least until CPython runs out of stack).

This should really be fixed, but how I'm not sure:

* preventing the implicit conversion in postgres?
* verifying that the returned id has the same type as the queried one?
* other?