Joint optimization of gratings and signal processing in computational diffractive imagers: Novel optical elements for lensless integrated imagers