Stochastic Activity Networks for Modelling Knowledge Bases