Add common functions to SQL and PL/SQL scanner.

Adds upper, lower, initcap, nvl2, decode and translate. nvl2 is only
added to SQL, as it is not available in PL/SQL.