tools: preserve the order of CPPPATH/CPPDEFINES/LIBPATH/LIBS

The order of them are important while the uniqueness has nothing to do
with the compiling.