Prominent Israeli rabbi mourned by thousands at funeral