RavenDB-2501 custom functions must perform validation against jint mecha...

...nism before saving