An exact renormalization model for earthquakes and material failure: statics and dynamics