Move more function implementations into common

Functions that are no more MySQL specific than that they take MCOMPAT types should be defined in common and instantiated with those types in mcompat.

This pattern was followed by many functions, but a number slipped through. This branch addresses those.

Anticipating that the automatic diff would not be very useful, I have limited this branch to ones where the transformation is mechanical. Just using supplied types instead of constant ones.

Functions remain that need work, including in particular almost everything have to do with dates and times.

Also, some functions that could be implemented this way, but do not seem like they are necessary outside MySQL compatibility, such as ASCII and STRCMP, are left out of this pass.