Kernel estimation of the survival function and hazard rate under weak dependence