Its your fault for acting like a door mat and being used. Theres a way to do it properly, you can give advice, but dont give into unreasonable demands. Talk about their problems with them as you would any other male friend, but dont bend over backwards for them, if they start demanding shit then they are seeing how far they can push you and if you are a doormat. If you act like one, dont be surprised when they use you to wipe their feet
Sometimes love grows out of the seeds of friendship, but if you are befriending her with the intent of scoring you are being deceitful...
What you described is exactly how girls relate to their friends, they talk about their problems, they NEED to talk, and usually some of the biggest problems will revolve around their significant other.
The psychology of males and females can be very different, this things that they tend to do that are totally different to us, either because of society or because of different chemicals in our brains[usually a combination] for example when girls bitch about their problems, often they dont want you to give advice and solve their problems [dump him!] they just want someone to listen and say stuff like "i know! you are right! what a jerk!" and be a shoulder to cry on.
When guys talk about problems its not usually because we need to get it out but because we are looking for advice or for a sounding board to work out some stuff with.
If you want her, dont try and be her friend it wont work, but if you want to be her friend then some of that stuff is bound to happen.