libpromises/evalfunction.c: fix datastate() prototype and move to its rightful place