You already know where to start, a very good cleaning. The walls, ceiling and trim should be washed with a TSP, trisodium phosphate, cleaner and rinsed well. If TSP isn't available, use ammonia and water.
Now these surfaces need a light sanding to roughen them up a bit for the best bond. I would use a pole sander and 120 grit sandpaper for the walls and ceiling. The trim can he hand sanded with medium grit sanding sponges. Give all sanded surfaces a quick rinse to remove any dust.
Priming, as you know, is critical. I would use Zinsser Cover Stain as the primer. It is an oil based primer, it will smell bad for a while. Open all windows and use fans for good ventilation. The good part is it will dry fast and the smell will dissipate in a few hours. Allow the primer to dry overnight before painting.
The primer is white so it will cover the old color a bit. The good part is you can use any paint color you want and you don't have to use oil based products from this point on. Plan on two coats of paint for the best coverage.
Don't give up on the floor just yet. It could be refinished by a flooring contractor. It is possible the wood is really nice and just need a good sanding and a couple coats of a urethane to bring it back to life.
The best way to check it is sanding a 2×2 area to reveal the wood and take a look. Do it yourself if you have a belt sander or ask the flooring contractor. If you think it isn't worth it then carpet over the wood.