Add cast method on field
#7264 (closed) showed that there are particular cases where we need to perform a cast on an expression to get the right type for a field. But SQLite does not support DATE, DATETIME nor TIME as cast type.
So I propose to add a generic sql_cast method on field that will return the SQL expression cast.
This will also simplify the write of such expression which implied to use sql_type etc.