Communication-avoiding kernel ridge regression on parallel and distributed systems