Top lawyer for Israeli president quits