Efficient Algorithms for Alternating Pushdown Systems with an Application to the Computation of Certificate Chains