Brake cleaner is your friend
Brake cleaner works wonders with cosmoline. Also, a little nylon brush after a good soak down.
I bought a mosin once that I had to "bleed" the cosmoline out of. It was a pain. Letting the wood set out in the sun in a black plastic bag helped get a lot out of the pores of the wood.