I just replaced the battery in my Nexus 5 due to earlier stages of the same issue. The battery failure was causing a lot of random device shutdowns that I had initially thought were related to the rollout of Lollipop.
Several of the posters there noticed that their battery had started bulging, ordered a new one, and reported that their devices were back to normal. Same issue and fix for my device.
This issue is definitely concerning, and I'm a bit surprised that more hasn't been made of it by now. It seems to be a fairly widespread problem.
There's a long support thread of people with similar issues at: https://productforums.google.com/forum/#!topic/nexus/IJSOuc7...
Several of the posters there noticed that their battery had started bulging, ordered a new one, and reported that their devices were back to normal. Same issue and fix for my device.
This issue is definitely concerning, and I'm a bit surprised that more hasn't been made of it by now. It seems to be a fairly widespread problem.