There's a few ways to make resting safer, but very few to make it actually safe. Beyond the ways you mentioned, you can cast the alarm spell to (probably) negate the initial coup chance during getting woken up or play as elf, who can't be caught asleep (though elves have... other problems). You can rest inside a rope trick or, if you luck out in generation, use ectoplasmic cocoon. Halflings start off with a number of hearthstones of o-something, which guarantee a safe rest. You can earth meld into a wall and use one of the dirt-to-mud spells to create a one-tile area that you probably won't be able to be attacked in. Finally, every few levels there'll be a room called a sanctuary, a lil'green-ish walled circular room. You can rest safely in sanctuaries for a certain number of times, after which their power gives out. Finally, high fort saves and things that reduce chances to be crit can make it so you're more likely to actually survive getting ganked in your sleep.
Generally, you'll sleep as little as possible and rely on sanctuaries. Before you pass clvl four (i.e. hit five combined class levels), you use the inn. Usually, you'll have enough resources and power by that point to not need an extended rest.
That faerie fire might be persistent debuff. It'll last all bloody day if it is, heh. Generally, if it won't let you auto-rest to clear a debuff, it's a persistent effect. Several of the traps hit you with persistent versions of normally non-persistent spells. They're nasty like that. I forget if FF's a naturally persistent spell, though. Eh. E: Ah, right. It'll go away once you rest, heh.