Cost estimator

This fixes #613. First the Costs members are now doubles to support divisions. The cumulative costs of a node are now computed in the following way: Costs for the node + adjusted costs of all predecessor nodes, where adjusted costs means that the costs of the predecessor node is divided by its out degree. This achieves that the costs of a node is propagated equally among its successors.