Polynomial and rational first integrals for planar quasi-homogeneous polynomial differential sytems