DRILL-975: Exception handling in function templates

Add errors as part of function template annotation

Dynamically determine return type of function based on whether session parameter "STOP_ON_ERROR" is set
 - Use GlobalFunctionRegistry and internally use multiple instances of FunctionImplementationRegistry

Abstract common logic in DrillBaseErrFuncHolder

Move FunctionImplementationRegistry class within GlobalFunctionRegistry.