AC wire hanging out by itself in receptacle, safe?
To your question on the plugs, yes you can just stuff them into the hole and leave them there, there are no exposed wires (no more than any switch or receptacle would have anyway). If you are overly cautious you could put some electrical tape over them, but I didn't bother when I swapped mine out.

One thing to be aware of, many of these older "hard wired" smoke detectors would "talk" to other units on the same wires, so if one goes off, they all go off, but also they would learn what other units were on the connections. So when you remove only one of them then, you get the others eventually start "chirping" at you to tell you that one of their pals is not responding. So if you remove one, you should remove and replace them all.

Also, some local fire codes REQUIRE that you have hard wired smoke detectors with battery backup. While living in the house it's up to you, but when you go to sell the house some day (or you are a renter and move out), you may be required to replace them with hard wired versions again.