db: crm: fix code not to use deprecated escapeInteger
db: email_account: fix code not to use deprecated escapeInteger
db: email_response: not to use deprecated escapeInteger
db: custom_field: not to use deprecated escapeInteger
db: custom_field: replace some instances of escapeInteger

this class is a mess