handle strings during upgrade of (Set,TimeWorked) txns

Pg and Oracle will stop update query if string can not
be converted to integer.

NewValue for (Set, TimeWorked) txns may contain string
if this DB was used with mysql and users entered strings
like "two days" as TimeWorked value. mysql just
converts string to 0 that end up in TimeWorked of a ticket,
but string as is ends up in transactions table.

For Pg/Oracle operation is just rejected and SetTimeWorked
fails.

Let's adjust upgrade SQL just in case RT was migrated from
mysql to Oracle/Pg.