Statistical physics of fracture, friction, and earthquakes