Quadratic curvature gravity with second order trace and massive gravity models in three dimensions