Me, I'd take a little of the goop and see if it dissolves in hot water. If it dissolves it's probably cosmoline. Remove as much as possible by hand; then rinse the rest out of the stock with hot water and dry thoroughly. If it's grease, I'd remove as much as possible by hand and then carefully wipe out the rest with odorless mineral spirits. But that's just me . . . .
BTW, sounds like you found a really cool old rifle!
"They've took the fun out of running the race. You never see a campfire anywhere. There's never any time for visiting." - Joe Redington Sr., 1997