Lipschitz spaces and Besov traces on self-similar fractals