Nonparametric Hawkes Processes: Online Estimation and Generalization Bounds