Nonparametric sequential estimation of the cumulative function by orthogonal series and application in reliability