A new Poincare` inequality and its application to the regularity of minimizers of integral functionals with nonstandard growth