Stable bounce and inflation in non-local higher derivative cosmology