Generalized self-concordant functions: a recipe for Newton-type methods