Improve IsFunction implementation across api, impl and json for
labelFunction use case in pie-chart.

Introduced JsFunctionSerializer to ensure raw function is serialized for
labelFunction attribute of AmSlicedChart from the IsFunction ->
JSFunction -> functionString.