The hierarchical Newton's method for numerically stable prioritized dynamic control