An implantable device for delivering insulin that can be refilled by an ingestible capsule