Judge who berated sick inmate asking for medical help days before she died has resigned