move endswith to utils
add fileExists
mkdirIfNeeded
move mkdirIfNeeded from h to cxx

Details:
this fixes the '_POSIX_SOURCE already defined' warning without
polluting all the source code where the header is included. Also, to
be honest I don't quite understand whether this define is really
needed (different explanations on the web).
move implementation to cxx, avoid multiple definition err
isInt
basedir
vdouble2str (could be templated...)
bugfix, int->double
add rmLeadingTrailingWhitespaces; use it in isInt
add a replace function for std::string
factorize mkdirIfNeeded -> dirExists + mkdirIfNeeded
contains
vfloat2str (should really use templates here)
getRootCoreDir
utils:subtract_vector
utils: define filter
utils::filter: better impl, still not working with isCentralLightJet