I can't give you recommendations for hostels etc. But hopefully I can reassure that you should feel completely safe in Rio. The first time I went was about ten years ago and some of the things I read were unnerving. But we NEVER felt one bit uncomfortable. We lived in San Francisco and anyone who has spent much time in big/congested cities live by the motto: don't be where you shouldn't be when you shouldn't be there. A place in any city where I'd feel safe during the day wouldn't necessarily be that late at night. If we're walking down a street and a person(s) is walking towards us that gives us pause, cross the street. If they cross to follow you - run like heck
Having said that I've never had to. I wouldn't go to gawk at the favelas in Rio. It is the most primitive, bone-achingly poor area in Rio on the hillsides. I understand from recent reading that they're actually doing organized tours there. I think that's pretty awful - just what those poor people need is a bunch of affluent (to them) tourists gawking at them! Rio has an energy that I've never felt anywhere else. It's one of our favorite cities. So buy a good guide book and definitely go. BTW, I've heard that cruise is GREAT! Have a great time.