Viscoelastic effects on residual oil distribution in flows through pillared microchannels