Model-independent search for CP violation in D0→K-K+π-π+ and D0→π-π+π+π- decays