I've mentioned this before on other forums, but I think the friendly AI "safety" is determined by difficulty. I played it on normal and found that, yeah, enemies would never notice Ellie or my other allies, but my friends that played it on hard said he opposite, that enemies would not only notice, but sometimes the friendly AI would jump out and fire, breaking stealth, if they felt it was necessary.
As for the ending: I personally liked it. I was going over this with a friend, and I realized that anything else would've made me not care. Considering what I personally found the story to be (not a "We have to save the world, but at what cost", but more "What would you give to actually live as oppose to simply survive") I understand that some people were angry or thought that Joel was being a dick, but I think part of the appeal in The Last of Us is realizing that, to a certain extent, you have to be a dick, otherwise you're used and killed. It's also keeping in character I think, because the more we learn about Joel, the more we realize just how much evil shit he's actually done, and this just sort of feels like we got a glimpse as to the type of stuff he used to do.