Add TO_BASE64 and FROM_BASE64 functions. 

Also, while I was looking for templates, I noticed two issues with HEX & UNHEX, which are included:
* Max VARBINARY is 65K, not 65.
* Abstract class was defined but never extended because all the inner classes derive fresh from TScalarBase.