make case searchable

add translatefieldtype instance for Interval Day
add wrapping of case predicates with sql stuff
fix bug with wrapped in quotes tablenames in rendered predicates