implemented ``cast`` scalar function

toLowerCase with LOCALE otherwise something like  cast (foo as INTEGER) will fail with turkish locale