compile functions before compiling number statements
compile functions before compiling number statements

Before this change, models like this one failed with a null ptr exception:

fixed Real rate = 2.0;
type Thing;
#Thing ~ Poisson(rate);
query({x for Thing x});

TODO: add the above as a regression test

BayesianLogic/blog,BayesianLogic/blog,BayesianLogic/blog,BayesianLogic/blog,BayesianLogic/blog