Immunocompatible electronic polymers and devices for implantable sensors and stimulators that resist foreign-body responses