Limit theorems for nearly unstable Hawkes processes: Version with technical appendix