Higher Order Curvature Theories of Gravity Matched with Observations: a Bridge Between Dark Energy and Dark Matter Problems