Theory of dynamical screening effects in the exciton and bipolaron formation; an application to strongly photoexcited semiconductors and to the bipolaron model for High-Tc Superconductivity