The cable wears out. If the charge is taking ages then it’s likely that it’s worn out, so get a new one. The cables wear by design so your phone doesn’t, but unfortunatly they don’t last that long with constant plugging everyday. Wireless charging has an advantage even if there are still wires involved.
Try charging your phone when it’s turned off, you cannot blame the OS if it’s still not charging. It could be the battery but most likely the cable. There seems to be a big difference in price of cables but I have found more expensive ones last longer, but they still wear out!
There is an issue with Lollipop, probably a memory leak. I find it suddenly starts to go really slow, crash regularly and drink battery. A phone reboot sorts it out and I have to do this about every week. A bit annoying when KitKat was so stable, I never turned the phone off in over a year. Fingers cross that 5.0.2 fixes it…
Just to add my Nexus is over a year old now and starting to show signs of an older battery. But with just occasional texting I’ll get through the day with about 40% intact. With occasional browsing and using the phone properly I generally get through till about tea time. The battery saving mode does wonders if you stay out without planning.
I wonder if an app is drinking the battery, perhaps have a look at your notifications. I know Facebook was a bit over eager to notify me of someone I once met entering some cafe I’d never heard of, had a big effect on battery life.