Hybrid Differential Dynamic Programming for Planar Manipulation Primitives