Algorithms for the Efficient Calculation of the Holonomy Decomposition