Does the Boeing B787 have safety issues with its battery and windshield?
The 787 is among the safest airliners currently flying. At the time of writing, it has been involved in zero hull loss incidents and there have been zero fatalities due to incidents.

While you can find numerous incidents including those you mention there have been exactly zero total losses and no loss of life on board (due to the aircraft itself - its possible people may have perished on board due to other factors not involved in aircraft safety).

It should be noted that A boeing report on this subject points out (page 19) that most of the aircraft which have had zero hull losses have also not accumulated 1 million departures. Therefore it might be too early to tell if there is any fundamental safety issues with these types. However, there has been 50+ years of learning about safety with regard to aircraft operations - and all of that feeds in to these modern aircraft. 

All in, I would consider flying on the B787 to be objectively safe (or, at very least equally so as other similar airliners). Does there exist some "wrinkles" to be ironed out? Perhaps - but they do not affect the overall safety of this type.